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

Help using Request.form

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I've created a form using ASP with a submit button (which saves the form's data) and anothre link Print Preview which opens another window and should show the values entered in the form.

I'm using Request.form, but somehow The Request.form is not working if I show the values in a new Window.

How do I do this.

PLEASE HELP!

mail me at nitin_bagga@hotmail.com
 
You have a few of options -- depending on how you have set this up --

(1) your form has a _target of _blank and the window pops up, in which case, you can read the values with request.form (assuming your form.method is post) --

(2) Most likely, you have the form.action pointing to another page, and so when you popup the window, you're doing it with the javaScript, window.open() or some such, and that's why the values aren't in the request.form --

So, to fix this, just remember that you can read the values from your parent window like this:

window.opener.formName.elementName.value

and in that fashion, you can get all of your values...

(3) Send the values via querystring to the new popup window (ie. newPage.asp?var1=val1&var2=val2) and then you can get them with request.querystring -- just like you would if you used a form.method of get --


Of the three, #2 is probably going to be your best bet, but any of them will work.

good luck! :)
Paul Prewett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top