You are here: irt.org | FAQ | JavaScript | Bugs | Q1737 [ previous next ]
Mark Chrisman writes:
This is a netscape/mac bug & workaround. On Netscape 4.0 & 4.6 for the Mac (I didn't check earlier Netscape versions), resizing the window will break all of your hyperlinks' onClick actions. For example:
<a href="" onclick="my_fancy_function()">click</a>
Here's the workaround (looks stupid, but I'm not kidding, it works!):
window.onresize = function () { if (navigator.appName.indexOf('Netscape') != -1) { if (document.links.length>0) { document.links[0].onclick = document.links[0].onclick; } } }
Interestingly, you don't need to iterate over all the links. Performing this meaningless action on document.links[0] will fix all the links.
I haven't tested the workaround in a document with layers or frames.