Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / May 2007



Tip: Looking for answers? Try searching our database.

global event handler

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rainer Hahnekamp - 31 May 2007 15:08 GMT
Hello,

i would need some kind of global event handler that is always
triggered when the user clicks on an element within the page. The
handler should be able to gather the element which was clicked.

What strategy suits best for this issue or are there already some
existing functions?

Greetings,
scripts.contact - 31 May 2007 16:39 GMT
On May 31, 8:08 am, Rainer Hahnekamp <rainer.hahnek...@gmail.com>
wrote:
> Hello,
>
> i would need some kind of global event handler that is always
> triggered when the user clicks on an element within the page. The
> handler should be able to gather the element which was clicked.

document.onclick=
 function(ev){
  ev=ev||event;
  var elem=ev.srcElement||ev.target
  alert(elem.tagName);
 }
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.