Re: Javascript IE vs. Netscape
by "Lisa H" <nstar92(at)bellatlantic.net>
|
Date: |
Thu, 9 Nov 2000 12:10:38 -0600 |
To: |
"Jennifer Evans" <jen(at)digital-voodoo.com>, <hwg-techniques(at)mail.hwg.org> |
References: |
voodoo |
|
todo: View
Thread,
Original
|
|
I have never had a problem in IE with JavaScript. Only in Netscape (no slam
intended)
----- Original Message -----
From: "Jennifer Evans" <jen(at)digital-voodoo.com>
To: <hwg-techniques(at)mail.hwg.org>
Sent: Thursday, November 09, 2000 9:22 AM
Subject: Javascript IE vs. Netscape
| Hello all-
| I'm perplexed as to why my javascript is doing what I want in Netscape and
| not behaving correctly in Internet Explorer. (All MS slams aside :-)
|
| I'm using javascripted maps that were created by Fireworks, and have added
| window.status arguments. They work correctly in Netscape 4.7 - the Status
| bar message changes with MouseOver and MouseOut and they link to proper
| location. In IE, however, the status bar will only display the link
| destination - which is exactly what I'd like to hide.
|
| Any insight that you can provide would be most appreciated. This is on a
| password protected intranet, so unfortunately you can't view the code in
| action, but here are the "active ingredients":
|
| <script language="JavaScript">
| <!--hide this script from non-javascript-enabled browsers
|
| function MM_findObj(n, d) { //v3.0
| var p,i,x; if(!d) d=document;
| if((p=n.indexOf("?"))>0&&parent.frames.length) {
| d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
| if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
| x=d.forms[i][n];
| for(i=0;!x&&d.layers&&i<d.layers.length;i++)
| x=MM_findObj(n,d.layers[i].document); return x;
| }
| /* Functions that swaps images. */
| function MM_swapImage() { //v3.0
| var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
| for(i=0;i<(a.length-2);i+=3)
| if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
| x.oSrc=x.src; x.src=a[i+2];}
| }
|
| // stop hiding -->
| </script>
|
| <html>
| <body>
|
| <img name="nav_left_fld" src="images/nav_left_fld.gif" border="0"
| usemap="#m_nav_left_fld" WIDTH="222" HEIGHT="63">
|
| <map name="m_nav_left_fld">
| <area shape="rect" coords="40,3,86,64" href="field/"
| onMouseOut="MM_swapImage('nav_left_fld','','images/nav_left_fld.gif',1);
| window.status='';"
|
onMouseOver="MM_swapImage('nav_left_fld','','images/nav_left_fld_f2.gif',1);
| window.status='Winning on the Field'; return true;">
| </map>
|
| </body>
| </html>
|
| thanks in advance,
| Jen
|
|
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA