[Javascript] Capturing which link/button is clicked

Esther_Strom at hmco.com Esther_Strom at hmco.com
Mon Nov 26 12:53:51 CST 2001


OK, that was supposed to read, "for reasons I don't pretend to
understand"...(I wish I could ignore this!)

Esther


                                                                                                                       
                    Esther_Strom at hmco                                                                                  
                    .com                     To:     javascript at LaTech.edu                                             
                    Sent by:                 cc:                                                                       
                    javascript-admin@        Subject:     [Javascript] Capturing which link/button is clicked          
                    LaTech.edu                                                                                         
                                                                                                                       
                                                                                                                       
                    11/26/01 12:42 PM                                                                                  
                    Please respond to                                                                                  
                    javascript                                                                                         
                                                                                                                       
                                                                                                                       




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



_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript







More information about the Javascript mailing list