Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display information about any object on click

Status
Not open for further replies.

gbrian

IS-IT--Management
Sep 22, 2004
96
US
Is it possible to create a script that would return the information about an object that was clicked?

IE - an alert that could return information such as ("Mouse Down on DIV NAME="test" OR "Mouse Up on IMG ALT="test image") without implementing events on each object?

Just looking for a high level view on how I could do this, or if it is possible - thanks all.
 
Well, specifically, I just want to trap each MouseUp and MouseDown event, for all objects that exist on the page.

This is possible? Where would you start, captureEvents?

Ultimately, I would want to be able to record when and where a user clicks/releases the mouse, the timestamps, and whether the object had a URL associated with it.

Thanks again
 
I wouldn't use captureEvents... that's old hat. The W3C recommends using addEventListener, which you can read more about here:


and here:


Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top