Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Executing a function before window.close

 
PavanPL KalyanK
Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi to Ranchi members

I have a button , and on the click of this window will be closed . I need to execute some function before the window closes . How can i ?


<input type=button value="Close Me" Onclick = window.close()/>

How can i achieve this ?

Please help

 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Pavan,

Call a function instead of window.close() and include your statements there inside the function() and at the end provide window.close()


something like this
 
PavanPL KalyanK
Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic