0

I am trying to simulate blur event in IE using JXBrowser.

HTML code:

<input type="text" id="email" name="email" onblur="test()">

and the function "test"

function test(){    
    alert("1");    
   alert(event.srcElement);    
}

when I try it manually in IE, I get it work perfectly, but when I run using JXBrowser it pop's up the first alert (alert("1")) but then says: "Unable to get value of the property 'srcElement': object is null or undefined". Why when I run JXBrowser it simulates the event but then it says that the event is null?

Thanks

1 Answers1

0

For the most part, event.srcElement is called event.target in other browsers. Generally you can write this:

var element = event.srcElement ? event.srcElement : event.target;
geocar
  • 9,085
  • 1
  • 29
  • 37