javascript - How to find what ASP.NET AJAX event handlers are associated with a DOM element? -


i'm customizing existing asp.net 3.5 ajax web application can't modify source code (it's sharepoint 2010).

i need add click event handler first event on close button. however, i'd check existing event handlers registered on button first, don't mess up.

i'm still learning asp.net ajax , can see sys.ui.domevent class has methods add , remove event handlers, not enumerate them. know jquery , familiar javascript debugging in chrome.

how can see which events registered , insert custom event handler @ particular position?

there technique @ least allow first in line (unless script employs same trick - unlikely).

what have hijack click event. related question demonstrates technique: hijacking onchange event without interfering original function

all redefine click function 1 of our own choosing, e.g.

var mybutton = document.getelementbyid('button1') var oldclick = mybutton.click;  mybutton.click = function(evt) {   //do whatever want.  when done, call default click function:   if (oldclick) oldclick(evt); } 

(the syntax in linked question superior, above code easier read).


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -