|
From: Tmuldoon on 24 Apr 2008 11:08 Hi, I have some Javascript that works on IE 6-7 but not Firefox(FF). FF throws this error when clicked: Hello, Using Publisher 6.2 and Firefox 2.0 We have a customized Publisher template that creates some Javascript that work fine in IE 6-7, but not FF. FF returns this error: Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead. [Break on this error] undefined (line 1) oNug.all is not a function [Break on this error] var e = oNug.all("disp"); How do I make it W3C compliant? Syntax help please! Would I say var e=oNug.getElementById("disp"); ? Why does it work with IE and not FF? Thanks, Tmuld
From: Holger Jeromin on 24 Apr 2008 11:15 Tmuldoon schrieb am 24.04.2008 17:08: > I have some Javascript that works on IE 6-7 but not Firefox(FF). > > FF throws this error when clicked: > > Hello, > > Using Publisher 6.2 and Firefox 2.0 > > We have a customized Publisher template that creates some Javascript > that work fine in IE 6-7, but not FF. We need your code for detailed analysis. > FF returns this error: > > Element referenced by ID/NAME in the global scope. Use W3C standard > document.getElementById() instead. > [Break on this error] undefined > (line 1) > oNug.all is not a function > [Break on this error] var e = oNug.all("disp"); > > How do I make it W3C compliant? Syntax help please! > > Would I say var e=oNug.getElementById("disp"); ? Try this: var e=document.getElementById("disp"); > Why does it work with IE and not FF? document.all is a MS invention. After that, the W3C has designed the proper DOM functions, which were implemented by FF and MS. -- Mit freundlichen Gr��en Holger Jeromin
|
Pages: 1 Prev: Adding SVG via Javascript in Explorer Next: Maintain a Div's Scroll Position After refresh |