I have a javascript function that disables the hrefs on a page by assigning "#" to each href. Th eneed to do so is to disable links in a print preview window. The print preview window contains only page content and not navigation, etc.
This works fine in IE6 but not in FireFox 2.0.0.2. In Firefox, the link always contains the current context or location. If a "#" is assigned the href becomes http://www.foo.com/context/currentpage.htm# instead of just "#" like in IE.
If I assign something invalid, e.g. "X", the href is http://www.foo.com/context/X
Any solution?
Thanks in advance.
Here is the code snippet that creates this fucntion in the popup window.
myWin.document.write('<sc'+'ript>');
myWin.document.write('function disableAnchor(disable){objLinks = document.links;');
myWin.document.write('for(i=0;i<objLinks.length;i+ +){objLinks[i].disabled = disable;objLinks[i].href=' + '"#"' + ';}}');
myWin.document.write('</sc'+'ript>');