PDA

View Full Version : Form Help


ozz
03-27-2003, 12:59 PM
Can someone give me a few pointers on this one please. When I click the submit button on my form; once it has validated the fields and sent the info I would then like it to close that page and open a page called page2.html. Thanks in advance




<form name="form2" form method="post" action="formMail.cgi" onSubmit="return validateform( this )">

Mhtml
03-27-2003, 01:23 PM
well...

window.open('page2.html')
window.close()


Essentially that will do it, although the user will be prompted to close the window.

ozz
03-27-2003, 01:46 PM
Thanks, were do i insert this code? Is it on the submit button bit?

Mhtml
03-27-2003, 01:52 PM
well you could do it like that.

<input type="submit" onClick="window.open('page2.html');window.close()"/>