button clicked

  • Thread starter Nithya Venkatachalam
  • Start date
N

Nithya Venkatachalam

Hi,

onclicking a button, iam calling a function which loads some other
page. so, it is calling onUnloadhandler.
In this onunloadhandler, is there any way to find the name of that
button?
 
R

Randy Webb

Nithya said:
Hi,

onclicking a button, iam calling a function which loads some other
page. so, it is calling onUnloadhandler.
In this onunloadhandler, is there any way to find the name of that
button?

Why not just send the buttons id or name when you call the function?

<button onclick="someFunction(this.id)" id="myButton">Text</button>

But I think the event handler you want is onBeforeUnload, not onunload.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top