Welcome to WebmasterWorld Guest from 54.166.46.226

Forum Moderators: open

Message Too Old, No Replies

passing variables to cgi through popup

phew !

   
10:25 pm on Sep 1, 2004 (gmt 0)

10+ Year Member



I am trying to call this :
<script LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=640,height=480,left = 256,top = 192');");
}
</script>

then,

<a HREF="javascript:popUp('http://10.16.65.58/cgi-bin/24674/tests_to_runcommands
.cgi')"><b><font size="5">Select commands
</b></a>

I need to pass data to tests_to_runcommands.cgi. How to do it?

Kindly help

11:00 pm on Sep 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Build your query as a Javascript variable, then pass that variable to the window.open script:

<script LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
thisPage="page"+id;
thisURL=URL+"?thisPage="+thisPage;
window.open(thisURL,"popupWin","toolbar=0,scrollbars=1,location=0...");
}
</script>

4:59 pm on Sep 2, 2004 (gmt 0)

10+ Year Member



thanks , it works