I have the following code in Mozilla:
<script type="application/x-javascript">
function listElementHandlers(aObj)
{
if(!aObj)
return null;
for(var list in aObj)
if(list.match(/^on/))
alert(list+'\n');
}
function dummy()
{
}
<script>
..
<input type="text" id="searchField" on keyup="listElementHandlers(this)" on blur="dummy()" >
..
This lists out all the 'on' events against that element(onkeyup and onblus in ths icase).
This does not work in IE- is it because 'this' in IE represents the document object?
How then do we simulate this in IE?
<script type="application/x-javascript">
function listElementHandlers(aObj)
{
if(!aObj)
return null;
for(var list in aObj)
if(list.match(/^on/))
alert(list+'\n');
}
function dummy()
{
}
<script>
..
<input type="text" id="searchField" on keyup="listElementHandlers(this)" on blur="dummy()" >
..
This lists out all the 'on' events against that element(onkeyup and onblus in ths icase).
This does not work in IE- is it because 'this' in IE represents the document object?
How then do we simulate this in IE?