function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
aditya prasadaditya prasad 

How to read value from pop up and display on parent page and close the pop up.

I want to create pop up which will open if you click on a text box. On pop if I put any value and once click on save the same value should be populated on parent page according to option selected in pop up.
1)for all record 
2)For selected record.
I don't want to refresh the whole page. Just the text box value should be changed.
I think this can be achieved through javascript dont need to go for apex. once values display I can calculate in apex.
But need some help on this.
Below image can explain it in better way.

User-added image

Thanks for helping on this.
Pankaj_GanwaniPankaj_Ganwani
Please refer below mentioned link:
http://www.aspsnippets.com/Articles/Pass-value-from-child-popup-window-to-parent-page-window-using-JavaScript.aspx
aditya prasadaditya prasad
Hi  Pankaj,

I tried to follow the link and used some tricks from there but could not get any result.may be that works only for  html page.
few codes from my page.
<tbody>
    <apex:repeat value="{!oppProducts_x}" var="item" id="itemTableData_x">
<td> <apex:inputField value="{!item.oli.Quantity}"/></td>
  </apex:repeat>                    
  </tbody>

Hopefully you can provide some suggestion for this.
aditya prasadaditya prasad
I am able to produce pop up from Parent.
My PoPUP VF page:
 
<apex:page showHeader="false"
            sidebar="false">
 <body>
<apex:form id="form1">
<input type="text" id="ddlNames"/>
 
<br />
<br />
<input type="button"  name="txt" value="Select" onclick="SetName();" />
 </apex:form> 
<script type="text/javascript">
    function SetName() {
            var txt = document.getElementsById("{!$Component.form1.ddlNames}").value;        
            var txtName = window.opener.document.getElementById("{!$Component.ocForm.op1.dataTablesContainer.itemTable.itemTableData_x.td1..quantity}");
            txtName.value = txt;
             alert(txtName);
        window.close();
    }
</script>


But It doesnot do anything when I click on Select button.If I remove all except window.close() from function it works and close the window.