Regarding Netscape compatibility for a code snippet(window.event.srcElement not working in netscape)
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, April 18, 2001 02:12 AM

I have a code snippet which need to work both in IE and netscape.But one stmt of this code window.event.srcElement is not working in netscape. The full code is here alert("clicked"); isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false; isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false; alert(isNav); alert(isIE); var targetId, srcElement, targetElement; srcElement = window.event.srcElement; alert("hello"); alert(srcElement); alert(srcElement.className); if (srcElement.className == 'Outline'){ targetId = srcElement.id + 'd'; targetElement = document.all(targetId); alert(targetElement.style.display); alert(targetElement.id); if (targetElement.style.display == 'none' ||targetElement.id=='Out1' ){ targetElement.style.di   More>>

I have a code snippet which need to work both in IE and netscape.But one stmt of this code window.event.srcElement is not working in netscape.
The full code is here


The code works with IE but netscape after hello nothing is getting printed.

   <<Less

Re: Regarding Netscape compatibility for a code snippet(window.event.srcElement not working in netscape)

Posted By:   tanveer_sayyed  
Posted On:   Wednesday, June 13, 2001 12:22 PM

even i facing the same problem friend but if you can use document.layers in for loop and find out the x and y coordinates of the click area then u will be able to get the srcelement id.
the second ways is to use
About | Sitemap | Contact