You need to sign in to do that
Don't have an account?
Lookup window problem using Visualforce
Hi,
I am trying to built an lookup functionality using the visualforce. I am able to open a popup window as well as able to display the data on it. whenever I am closing the second page, it is not updating the value to the first page.
Here is same code.value should be displayed in the textbox in the parent form .plz help me .
Parent Window:
<apex:page controller="popupwindow">
<apex:form >
<apex:inputtext value="{!textval}"/>
<apex:commandLink value="get" onclick="popup('/apex/childwindow')"/><br/>
<script>
function popup(url)
{
newwindow=window.open(url,'name','width=400,height=400,top=0,toolbar=no,personalbar=no,location=no,directories=no,statusbar=no,menubar=no,status=no,re sizable=yes,left=60,screenX=60,top=100,screenY=100');
if (window.focus){newwindow.focus()}
}
</script>
</apex:form>
</apex:page>
Child Window:
<apex:page controller="popupwindow" sidebar="false">
<apex:form >
<apex:dataTable value="{!accounts}" var="a" cellPadding="4" border="1">
<apex:column headervalue="Account Name">
<apex:commandLink onclick="close1()" action="{!filltextval}">
<apex:param name="name1" value="{!a.Name}"/>
{!a.Name}</apex:commandLink></apex:column>
</apex:dataTable>
<script>
function close1()
{
<!-- parent.window.opener.location.reload(); -->
parent.window.close();
}
</script>
</apex:form>
</apex:page>
Controller:
public class popupwindow
{
Public string textval{get;set;}
Public List<Account> getAccounts()
{
List<Account> acclist = [select name from account limit 10];
return acclist;
}
Public void filltextval()
{
textval = apexpages.currentpage().getparameters().get('name1');
}
I am going to move your post to the Developer Boards - I think you will get a quicker answer on this over there. Hope it helps.
Erica
instead of parent use top.
anybody give me the solution.i did not get the solution yet.
i want Data from Pop up VF page to Parent VF Page.plz provide the coding.