Re: Pass variables to a pop-up window

From: Date: Thu, 14 Sep 2000 16:53:29 +0000
Subject: Re: Pass variables to a pop-up window
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-16810@lists.php.net to get a copy of this message
>> Hi, List - >> >> I have form page and a response page that work fine as is in the same >> browser window. However, when I try to load the response page into a pop-up >> window using java script, the variables I'm passing don't get passed. I'm >> kind of new to all this and I have little doubt that I'm missing something >> obvious. Can anyone out there help by pointing it out? >> >> Thank you! >> >> Beth > > Please post your code. > > Martin > This is the code that works fine in the same browser window: page 1: <FORM ACTION="response.phtml" METHOD="POST"> <!-- Bunch of code for the form goes here --!> Information:<TEXTAREA NAME='Information' ROWS=11 COLS=50 wrap> </TEXTAREA> <? echo "<input type=\"hidden\" name=\"Month\" value=\"$month\">"; echo "<input type=\"hidden\" name=\"Year\" value=\"$year\">"; ?> <INPUT TYPE="submit" NAME="Submit" VALUE="Submit"> <input type="reset"> </form> and the response page: <? php_track_vars ?> etc. And here is the code for the pop_up window, which does not work: page 1: <head> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=1,width=5 00,height=300');"); } // End --> </script> </head> <FORM ACTION="response.phtml" METHOD="POST"> <!--Bunch of code for the form--!> <input type=button value="Submit" onClick="javascript:popUp('response.phtml')"> <input type="reset"> </form> and on the response page: <? php_track_vars ?> etc. As I said, I'm new to this and I'm probably missing something really obvious. I did check the archives first before posting!! Again, thanks for your help. Beth

« previous php.general (#16810) next »