[Javascript] How can I include form values in a javascript w indow.open?

Scott.Wiseman swiseman at remax-cahi.com
Fri Nov 9 14:19:43 CST 2001


how about assigning a value from javascript to the query line of the new
window
and using asp to recall that when the new window opens?
 
openBrWindow('dummy.htm?ID=window.document.id.value','CARDS','scrollbars=yes
,resizable= 

yes,width=640,height=600') 

 

 

 -----Original Message-----
From: garry taylor [mailto:gtaylor at lowebroadway.com]
Sent: Friday, November 09, 2001 9:08 AM
To: javascript at LaTech.edu
Subject: Re: [Javascript] How can I include form values in a javascript
window.open?



From: Rodney Myers <rodney at aflyingstart.net> 

Date: Fri Nov 09, 2001 02:49:45 PM Etc/GMT 

To: javascript at LaTech.edu 

Subject: Re: [Javascript] How can I include form values in a javascript
window.open? 

Reply-To: javascript at LaTech.edu 


Garry 


How about 



<FORM name="main" METHOD="GET" 

onSubmit="MM_openBrWindow('dummy.htm','CARDS','scrollbars=yes,resizable= 

yes,width=640,height=600')" ACTION="inputuserdetails.cgi" TARGET="CARDS"> 


You may need to pay around with the dummy.htm url - which if used should
represent a 

real placeholding file, and preferably a small one already in browser cache,
since 

there is a danger of contention for the window which can crash some
browsers. 


You might try a button in the form, with this form tag at the top 


<FORM name="main" METHOD="GET" ACTION="inputuserdetails.cgi" TARGET="CARDS">



<input type="button" value="Submit" 

onClick="MM_openBrWindow('dummy.htm','CARDS','scrollbars=yes,resizable= 

yes,width=640,height=600');setTimeout('window.document.main.submit()',2000)"
> 


This gives the window 2 seconds to open and get dummy.htm (which may be a
completely 

blank bodied file) before any submission. 


hth 



Rodney 


Thanks a lot for that, it works very well except that the browser window
still has the address toolbar on it, the old one did'nt, even though the
code did not specify either way. Bit strange that, anyway the principle
works, and no reliability problems! 


Cheers 


Garry 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20011109/f30dd42c/attachment.htm>


More information about the Javascript mailing list