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!

form submission to new window

Status
Not open for further replies.

ram123

Programmer
Mar 6, 2001
59
US
I want to submit the form new window, i.e. when i click the submit button a new window should be opened and that new window should have the access to the form variable posted.
Can any one help me out?
Thanks in advance.
 
Hi,

Suppose your form has a "variable" named
Code:
name
. Do you know how to use onSubmit? Never mind... on
Code:
<form ...
add
Code:
onSubmit=&quot;return TWindow(this);&quot;>
.
The code for TWindow should be:
Code:
function  TWindow(tform)
{
  msg=window.open(&quot;&quot;,&quot;msg&quot;,&quot;height=200,width=200,left=80,top=80&quot;);
  msg.document.write(&quot;<html><title>Windows!</title>&quot;);
  msg.document.write(&quot;<body bgcolor='white' onblur=window.close()>&quot;);
  msg.document.write(&quot;<center>&quot;+tform.name.value+&quot;</center>&quot;);
  msg.document.write(&quot;<center>page content here</center>&quot;);
  msg.document.write(&quot;</body></html><p>&quot;);
  return true;
}
Hope this help.

Regards,
Luís Silva

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top