T
TErnst
Hello All....
What I am attempting to do is have a link/button on a page
(testpopup.cfm) that opens a popup page (popupwindow.cfm). The popup
page displays a resultset from a query and the selected record needs
to be passed through a query string/URL parameter to the original
calling page and will be available in the body onload event of the
calling page.
I open the popup window and display the query results, I then click on
a record and the record is then displayed in the calling form textbox
(txtOrg) - - - only the calling form appears in the POPUP window!
This is not what I need it to do. I need it to pass the URL parameter
to the calling page and close the popup. Here is the code from the
two pages. Can you shed any light on this?
testpopup.cfm
<html>
<head>
<script language="JavaScript">
var strValue = location.search.split( '=' )[1];
</script>
</head>
<body onLoad="document.MyForm.txtOrg.value = strValue;">
<form action="" method="get" name="MyForm" id="MyForm">
<input name="txtOrg" type="text" id="txtOrg">
<input type="button" name="choice"
onClick="window.open('popupwindow.cfm','','width=300,height=300,top=100,left=100');"
value="Search for Org"><br>
</form>
</body>
</html>
popupwindow.cfm
<html>
<head>
<cfquery name="OrgDetail" datasource="InTouch">
select * from vwOrgDetail
</cfquery>
<title>Select Organization</title>
</head>
<body>
<cfoutput query="OrgDetail">
<a href="testpopup.cfm?Name=#Name#"
onclick="javascript:self.close()">#Name#</a><br>
</cfoutput>
</body>
</html>
What I am attempting to do is have a link/button on a page
(testpopup.cfm) that opens a popup page (popupwindow.cfm). The popup
page displays a resultset from a query and the selected record needs
to be passed through a query string/URL parameter to the original
calling page and will be available in the body onload event of the
calling page.
I open the popup window and display the query results, I then click on
a record and the record is then displayed in the calling form textbox
(txtOrg) - - - only the calling form appears in the POPUP window!
This is not what I need it to do. I need it to pass the URL parameter
to the calling page and close the popup. Here is the code from the
two pages. Can you shed any light on this?
testpopup.cfm
<html>
<head>
<script language="JavaScript">
var strValue = location.search.split( '=' )[1];
</script>
</head>
<body onLoad="document.MyForm.txtOrg.value = strValue;">
<form action="" method="get" name="MyForm" id="MyForm">
<input name="txtOrg" type="text" id="txtOrg">
<input type="button" name="choice"
onClick="window.open('popupwindow.cfm','','width=300,height=300,top=100,left=100');"
value="Search for Org"><br>
</form>
</body>
</html>
popupwindow.cfm
<html>
<head>
<cfquery name="OrgDetail" datasource="InTouch">
select * from vwOrgDetail
</cfquery>
<title>Select Organization</title>
</head>
<body>
<cfoutput query="OrgDetail">
<a href="testpopup.cfm?Name=#Name#"
onclick="javascript:self.close()">#Name#</a><br>
</cfoutput>
</body>
</html>