0

Say I have the following code:

poNode = poEvent.target ? poEvent.target : poEvent.srcElement;

Is there a way I can force Internet Explorer to use the poEvent.target object?

3
Contributors
5
Replies
7
Views
6 Years
Discussion Span
Last Post by Troy III
0

Can you make firefox or any thing else for that matter understand what poEvent is, if it is, for whatever it is, first?!

0

Well, practically it is not!

poEvent is not "just like saying e.target" at all. In fact its just like stating 7 meaningless letters and let the browser guess what you were thinking.

Neither "e.target" has any meaning at all. You need to first define "e", because it is also undefined by default.

0
function eventHandler(e) {
  e = e || window.event;
  var target = e.target || e.srcElement;
  /*
  the rest of your handler here
  */
}

This and more good tips here: http://javascript.crockford.com/style2.html

Airshow

or better say:

function curent_poNode(){
	poNode = event.srcElement;
	}

now you can use your "poNode" to reference any event-source-element of the document, on browsers including: IE*; Chrome*; Opera*; Safari*; -excluding FF only.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.