[Javascript] Capturing which link/button is clicked

Esther_Strom at hmco.com Esther_Strom at hmco.com
Mon Nov 26 12:42:41 CST 2001


For reasons I don't pretend to ignore, a colleague has set up a form so
that no matter which link is clicked on, an onUnload script changes the
location. For example:

<a href="goToThisPage.html">Go here</a>

onUnload="window.location.href='goToThisPageInstead.html'"

(The URL in onUnload isn't actually an HTML page, but a Domino agent that
runs onUnload. Just using .html above for clarity.)

Anyway, I now need to find a way to capture the URL on the link that was
actually clicked. Compounding this problem is that not all clickable things
are links; some are buttons that run other agents, or javascript functions.

So, is there any consistent way to capture the action (onClick or a href)
of whatever button or link a user has clicked?

I apologize if this isn't clear; I can't quite understand what he's trying
to do, but I'm apparently expected to make it work.  : (

Thanks,

Esther






More information about the Javascript mailing list