|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I have a form on an asp page with multiple fields and also multiple submission buttons. When I click on submit1 I would like a new window (url1) to open with the form values embedded in the html. Submit2 opens another new window (url2), etc. I have tried a form, action="samepage.asp" (feeds back on itself) (method=post) with an onclick="javascript pen popup window" and request.form values on the target page but this doesn't seem to work, any ideas ?thanks and regards, Chris http://www.gener8cash.co.uk |
|
#2
|
|||
|
|||
|
Re: Passing Form values to a popup window
Use session variables
Quote:
|
|
#3
|
|||
|
|||
|
yes, I had tried this to no avail.
nevertheless I have managed to sort it by using a target=blank and onClick="document.formname.action='targetpage.asp';" thanks anyway ... ![]() |
|
#4
|
|||
|
|||
|
Great code... it was exactly what I was looking for.
I'm wondering if this code could also be modified so that the new window has no toolbars/menu bars, resizable, scrollbar etc.? Thanks for any help. Quote:
|
|
#5
|
|||
|
|||
|
The only way I know of to do this is to do a window.open. You can build a querystring using asp to pass the values from your form.
ie: window.open(<formname.asp?create your querystring here>,'', 'toolbar=0,menubar=0,resizable=0,scrollbars=0',tru e); |
|
#6
|
|||
|
|||
|
Unfortunately I don't know much about JavaScript. I just use scripts from here and there to make things work with a bit of modification if I can figure a bit of it out. So anyway I'm not sure how create a query string. Can you help me out with it?
Quote:
|
|
#7
|
|||
|
|||
|
Actually, the only way I know to do this is by using javascript.
Here's an example: <% any initial asp stuff here...%> <form name=formname target=popup.asp> <input name=input1> <input name=input2> <input name=input3> <input TYPE="button" VALUE="Press Me" onclick=" var q1=document.formname.input1.value; //these variable aren't necessary, but make the window.open shorter var q2=document.formname.input2.value; var q3=document.formname.input3.value; window.open('./<your asp age>.asp?arg1='+q1+'&arg2='+q2+'&arg3='+q3, '','toolbar=0,location=0,directories=0,status=0,me nubar=0,scrollbars=0,resizable=0',true); "> </form> |
|
#8
|
|||
|
|||
|
Thanks man. I'll give it a shot. Much appreciated.
Quote:
|
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Passing Form values to a popup window |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|