Omirion Posted March 12, 2010 Share Posted March 12, 2010 function nav_InnerHtml_set(){ if (event.target) {document.getElementById('navText').innerHTML = event.target.innerHTML ;} } basic functionality I'm trying to achieve. But FF returns the event.target as undefined. Anyone know of a workaround? Link to comment https://forums.phpfreaks.com/topic/195001-eventtarget-hack-for-ff-needed/ Share on other sites More sharing options...
Omirion Posted March 12, 2010 Author Share Posted March 12, 2010 Nevermind got it. here is the complete code if anyone is interested. function nav_InnerHtml_set(e){ if(e == undefined) e = window.event; var node = e.target; while(node.nodeType != node.ELEMENT_NODE) node = node.parentNode; } node is your calling elements instance. Works in IE FF CHROME Link to comment https://forums.phpfreaks.com/topic/195001-eventtarget-hack-for-ff-needed/#findComment-1025160 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.