PDA

View Full Version : Netscape Compatibility?



maikai
04-19-2005, 09:44 PM
Script: AnyLink Drop Down Menu
http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

I posted the code given for this drop down menu on the following test page and when checking in Netscape 4.7 it doesn't work and shows an error message "JavaScript error" at the bottom of the page.
Test page: http://www.maikaihawaii.com/testmenu.htm

The same results on a modified version that was installed on the new web site we're working on. Following is a page where it is located:
http://www.maikaihawaii.com/hawaiian_perfumes_lotions.htm

It seems to work fine in Internet Explorer but when checking on Netscape it doesn't work. Is it because it's we're using an older version of Netscape? Maybe it works in newer versions?

Any insight or assistance will be greatly appreciated!

jscheuer1
04-19-2005, 10:19 PM
Yes and yes. Netscape 4.7 is so old that it crashes frequently on pages using modern css style, let alone JavaScript. Luckily it did not crash on this. To quote from the page where this script is featured:

"This script works in all the major DHTML browsers- IE4+, NS6+, and Opera7+."

You can eliminate the error by adding these two lines:
if (document.layers)
return;before the line that reads:
if (window.event) event.cancelBubble=trueThis will not make it work though. You could add a script to the body that provides alternate content like:
<script type="text/javascript">
if (document.layers)
document.write('<br>&nbsp;<br><a href="http://www.javascriptkit.com">JavaScript Kit</a><br>\
<a href="http://www.freewarejava.com">Freewarejava.com</a><br>\
<a href="http://codingforums.com">Coding Forums</a><br>\
<a href="http://www.cssdrive.com">CSS Drive</a>');
</script>just below this line:
<a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()">Web Design</a>Hope this helps.

maikai
04-20-2005, 12:56 AM
Thank you, thank you, thank you!

You've been a HUGE help and we sincerely appreciate your time and knowledge.

ddadmin
04-20-2005, 06:02 PM
Just FYI, I explicitly removed support for NS4 in Anylink Menu in the last update to it a couple of weeks ago. This is following a trend to drop NS4 completely from the picture due to its basically non existent status on the web these days. Removing support provides more benefits than clinging on to it in my opinion, such as leaner, more efficient code.