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

Close window with submit button 1

Status
Not open for further replies.

frenchtaquito

Technical User
Apr 5, 2001
56
US
Howdy, I know this is an easy one but I can't it figure out. I've made a pop up window for a form to be mailed to my e-mail address on "submit". I also want the submit button to close the pop up window but I can't figure out how. I think I'm just missing something small. Any help would be fantastic. Thanks in advance!
 
I can help with the javascript that will close the window but I am not sure where to put it without having Dreamweaver open in front of me. Normally you would just add it as a href in the code but I have never had one button do 2 different things outside of Flash. Let me think about it for a bit

The code is javascript:window.close() Ya' Gotta Love It!
sleepyangelsBW.jpg
 
I tried putting the javascript in as a "call Javascript" behavior but it isn't working. I also tried using a separate button altogther but it didn't work either. I just know it's something simple that I'm missing but i'm not seeing it. Maybe a cup of coffee will help. Thanks for the info though, I think it put me on the right track. Cheers!
 
Ok, I got it working as a separate button and that will have to do. Thanks for your help.
 
Hello all!

Just in addition:

It should look like this:
<input type=&quot;submit&quot; name=&quot;submit&quot; onClick=&quot;window.close()&quot;>

This little piece of code submits the form and closes the window (don't forget to surround it with FORM tags).

Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top