Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

two actions with single button  RSS feed

 
Archana Annamaneni
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4585
6
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!