Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with storage of form values 1

Status
Not open for further replies.

mimi2

Technical User
Apr 2, 2002
407
CA
hello, i am trying to pass to another page all the values of a form
page1 contains the form and calls page2 to display the client's choices.
i need to pass somthing like: page2.cfm?var1=#var1#&var2=#var2#&var3=#var3#

from page1
<INPUT TYPE=BUTTON name=&quot;Preview&quot; VALUE=&quot;Preview&quot; onclick=&quot;WinOpen('PreviewRequest.cfm','700','300')&quot;>
<script language=&quot;javascript&quot;>
function WinOpen(xurl,x,y) {
var options = &quot;toolbar=no,scrollbars=yes,resizable=yes,width=&quot; + x + &quot;,height=&quot; + y;
var tempVar = &quot;&quot;;
var tempArray = new array[3];
for (i = 0; i < 3; i++)
{tempArray= &quot;var&quot; + ;}
//for (i = 1; i < document.form.length; i++)
for (i = 1; i < 3; i++)
{ tempVar += &quot;&&quot; + tempArray + &quot;=&quot; + &quot;#&quot; + this.form.elements.value + &quot;#&quot;;}
thisurl =xurl + &quot;?&quot; + tempArray[0] + &quot;=&quot; + &quot;#&quot; + this.form.elements[0].value + &quot;#&quot; + tempVar;
msgWindow=window.open(thisurl,&quot;WinOpen&quot;,options);
}
requestform.cfm
display the variables
 
Hi,

Try opening the window first and then passing it the URL. Somthing like:

...
msgWindow=window.open(&quot;&quot;,&quot;WinOpen&quot;,&quot;width=700,height=300&quot;);
msgWindow.location.href=&quot;./PreviewRequest.cfm?param1=&quot;+var1+&quot;param2=&quot;+var2;
...


I use something like this in a function called by the onSubmit event, and it works.

Bye.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top