By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,930 Members | 1,321 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,930 IT Pros & Developers. It's quick & easy.

button clicked

P: n/a
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?

Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Nithya Venkatachalam wrote:
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.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.