wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes two actions with single button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "two actions with single button" Watch "two actions with single button" New topic
Author

two actions with single button

Archana Annamaneni
Ranch Hand

Joined: Jan 29, 2003
Posts: 147
I have this problem

I have a popup window with a close button , when user clicks on that close button i want to do two actions , clsoe that window and call a jsp page .This close button is in the html form . I think i need javascript , but i am not sure how to do that .

Is there any other way to do that.
Somebody please provide me with some sample code
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
basic idea before i leave work..
onclick="Action1();Action2();"
an example
onclick="document.FormName.submit();this.close;"
if you do it this way you might run into the problem of the form not submitting....then again I am not sure what you need to be done. call it the 5pm brain freeze
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

not an answer, but something to be aware of. if your popup window has a close button in the top right corner, "X", the user is very likely to use it instead of the close button in your form.


SCJP
Visit my download page
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: two actions with single button