Skip to main content
Known Participant
September 11, 2009
Question

pass parameter to popup window

  • September 11, 2009
  • 1 reply
  • 774 views

I have a popup window that open cfm form(ical.cfm).

<SCRIPT language="JavaScript1.2">

function poponload()

{

testwindow= window.open ("ical.cfm", "mywindow",

    "location=1,status=1,scrollbars=1,width=300,height=300");

testwindow.moveTo(0,0);

}

</SCRIPT>

I need to pass evetID to the popup window. How I can do that. I need to pass (# CollegeEvents .eventID#)

<cfoutput query="CollegeEvents">

<img src="../images/events.jpg" onclick="poponload()"> 

</cfoutput>

    This topic has been closed for replies.

    1 reply

    Inspiring
    September 11, 2009

    Make it a url variable.

    In the window.open command, append the name-value pair in the usual manner.  Refer to the address bar of your browser for an example.

    In the pop-up, refer to the variable in the url scope.