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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass Form variables to new page 1

Status
Not open for further replies.

BillBrosius

Programmer
Jan 9, 2003
33
0
0
US
I need to be able to pass variables to a new page that will then process the information. Here is the basic idea of the process:

<Script Language=&quot;JavaScript&quot;>
Function PassInfo(url) {
window.open(url, target='new window');
}
</Script>


<Input Type=&quot;Text&quot; Name=&quot;frmName&quot; onchange=&quot;javascript:passInfo('process.asp?ID=<%=empID%>&val=this.form.frmName.value')>

The new page opens and gathers the variables using &quot;request.querystring&quot;, but instead of getting the actual value of the Field named &quot;frmName&quot; I get &quot;this.form.frmName.value&quot;.

What do I need to do to get the actual Field value?

Thanks.


 
You must currently have something similar to this:
Code:
Code:
 var qstring
Code:
Code:
=
Code:
&quot;index.php?&quot;
Code:
;
Code:
Code:
     qstring
Code:
+=
Code:
&quot;frmName=this.form.frmName.value&quot;
Code:
;
Code:
Code:
     qstring
Code:
+=
Code:
&quot;&&quot;
Code:
;
Code:
Code:
     qstring
Code:
+=
Code:
&quot;otherField=this.form.otherField.value&quot;
Code:
;
Code:
But what you need is this:
Code:
Code:
 var qstring
Code:
=
Code:
&quot;index.php?&quot;
Code:
;
Code:
Code:
     qstring
Code:
+=
Code:
&quot;frmName=&quot;
Code:
+
Code:
this.form.frmName.value
Code:
;
Code:
Code:
     qstring
Code:
+=
Code:
&quot;&&quot;
Code:
;
Code:
Code:
     qstring
Code:
+=
Code:
&quot;otherField=&quot;
Code:
+
Code:
this.form.otherField.value
Code:
;
Code:
-gerrygerry

&quot;I'm doin' a one-nighter for bitin' Ed the mail man... the guy was tryin' to cast a spell on me... like a wizard or something.&quot;
&quot;Are you sure about that?&quot;
&quot;I dunno... maybe he was just wavin' [wavey]...&quot;
 
That worked!! Thank you so much for the fast response.
 
Alwyas like to help when I can :) -gerrygerry

&quot;I'm doin' a one-nighter for bitin' Ed the mail man... the guy was tryin' to cast a spell on me... like a wizard or something.&quot;
&quot;Are you sure about that?&quot;
&quot;I dunno... maybe he was just wavin' [wavey]...&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top