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? Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.