nibelungen
08-29-2009, 10:17 AM
Hello everyone.
I'm new to this forum and very inexperienced when it comes to javascripting, so please have mercy if I display too much ignorance for those experienced gurus. Thanks. Anyway, I'm trying to help someone out with a script that they'd like to implement on pages in their website. We found a script that does the job perfectly and it's actually supposed to be cross-browser compatible. The script is from 2003 or 2004 though. There are 4 additional js files that work together with the script that's embedded in the html files. Here's a link to a page with that script:
This script works 100% perfectly with Firefox (http://www.einfachclicken.de/banners/bannermuster02.html)
However, when I try to check that same page with IE6 (can't check with IE7/8 since I'm using Ubuntu), I receive a script error on the bottom, telling me that the error is on line 55, character 7. With IE6 the page shows the background cell, but not the contents that the script is supposed to produce. Checking the html file doesn't tell me anything at all since that line needs to be there. A friend of mine who has a little javascript knowledge used a javascript debugger. He told me that when he tries to view the page with IE7 or IE8 he gets that bar at the top about activating unsecure (javascript) elements on the page? According to him, the javascript debugger mentions that an error is coming out of the separate dw_core.js file.
The script debugger showed the error in this section of the dw_core.js file:
dynObj.prototype.writeLyr = function (cntnt) {
if (typeof this.doc.innerHTML!="undefined") {
this.doc.innerHTML = cntnt;
} else if (document.layers) {
this.doc.write(cntnt);
this.doc.close();
}
}
Specifically this line is where the error is supposed to be coming from:
this.doc.innerHTML = cntnt;
So he told me to change the if line to this instead:
if (typeof this.doc.innerHTML!="undefined" && typeof this.doc.innerHTML!=null)
That didn't help though. :(
We did try using the full path to the js files and we also tried placing the js files in the same folder as the html files. Placing the script tags to the js files out of the <HEAD> section actually made the script work smoother for some weird reason.
There's an alternative script that's being used at the moment (same link as above, but without the 02 at the end) however that one won't display the title text for links/images when viewed in Ubuntu/Firefox. Other than that it works great with IE6/7/8 and Firefox. The script that we'd like to use (link above) is much more attractive with its effects though and the title text does indeed show up in all of the browsers. I'd really appreciate some help on this and would be willing to make a little Paypal donation for the (successful) effort if we can get it all to work right with Ubuntu/Firefox. Thanks a bunch for your time and patience in advance.
Greetings from Germany
I'm new to this forum and very inexperienced when it comes to javascripting, so please have mercy if I display too much ignorance for those experienced gurus. Thanks. Anyway, I'm trying to help someone out with a script that they'd like to implement on pages in their website. We found a script that does the job perfectly and it's actually supposed to be cross-browser compatible. The script is from 2003 or 2004 though. There are 4 additional js files that work together with the script that's embedded in the html files. Here's a link to a page with that script:
This script works 100% perfectly with Firefox (http://www.einfachclicken.de/banners/bannermuster02.html)
However, when I try to check that same page with IE6 (can't check with IE7/8 since I'm using Ubuntu), I receive a script error on the bottom, telling me that the error is on line 55, character 7. With IE6 the page shows the background cell, but not the contents that the script is supposed to produce. Checking the html file doesn't tell me anything at all since that line needs to be there. A friend of mine who has a little javascript knowledge used a javascript debugger. He told me that when he tries to view the page with IE7 or IE8 he gets that bar at the top about activating unsecure (javascript) elements on the page? According to him, the javascript debugger mentions that an error is coming out of the separate dw_core.js file.
The script debugger showed the error in this section of the dw_core.js file:
dynObj.prototype.writeLyr = function (cntnt) {
if (typeof this.doc.innerHTML!="undefined") {
this.doc.innerHTML = cntnt;
} else if (document.layers) {
this.doc.write(cntnt);
this.doc.close();
}
}
Specifically this line is where the error is supposed to be coming from:
this.doc.innerHTML = cntnt;
So he told me to change the if line to this instead:
if (typeof this.doc.innerHTML!="undefined" && typeof this.doc.innerHTML!=null)
That didn't help though. :(
We did try using the full path to the js files and we also tried placing the js files in the same folder as the html files. Placing the script tags to the js files out of the <HEAD> section actually made the script work smoother for some weird reason.
There's an alternative script that's being used at the moment (same link as above, but without the 02 at the end) however that one won't display the title text for links/images when viewed in Ubuntu/Firefox. Other than that it works great with IE6/7/8 and Firefox. The script that we'd like to use (link above) is much more attractive with its effects though and the title text does indeed show up in all of the browsers. I'd really appreciate some help on this and would be willing to make a little Paypal donation for the (successful) effort if we can get it all to work right with Ubuntu/Firefox. Thanks a bunch for your time and patience in advance.
Greetings from Germany