- From: Andreas Thorstensson <andy@spray.se>
- Date: Mon, 02 Mar 1998 15:43:44 +0100
- To: Vidyut Luther <vluther@doconline.com>
- CC: W3 HTML Mailing list <www-html@w3.org>
document.image isnt supported by ie 3.01 and ns 2.02 Vidyut Luther wrote: > Hi, > My question is regarding JavaScript and it's compatibility with browsers. > > I am working on a web page, and this is my first attempt at javascript, > I'm attempting to do mouse overs, but i've been getting some wierd errors, > when the page is viewed by different browsers. > > I designed the page using communicator 4.03 as the preview browser and > notepad as the editor. anyway here is the source for the javascript and > then i'll try and explain what it's supposed to do, and what the error > messages are. > > <HTML> > <HEAD> > > <SCRIPT language="javascript"> > function buttonSwap(idx, newImage) > {document.images[idx].src = newImage;} > </SCRIPT> > <TITLE> Doc Online </TITLE> > <BODY > > <TABLE> > <TR> > <td colspan=2><CENTER> > <A HREF="news/index.html" onMouseOver="buttonSwap(1,"newsbot.gif")" onMouseOut="buttonSwap(1, "newsup.gif")"> > <IMG SRC="newsup.gif" BORDER=0></A></CENTER> > </TD></TR> > </TABLE> > </BODY> > </HTML> > if you see the code, you'll realize that it's a simple onmouseover, and > onmouse out function. it works great in communicator 4.03. But when i > tried to view it using IE 3.01, i got a javascript error, it said > something about image can't be used as an array, and the same thing using > netscape 2.02. > > But, when it's viewed through netscape 3.0, the whole page loads up fine > and dandy, but once the mouse goes over any of the images on the table, > another image is loaded up, but not right over the old image, it seems the > new image is loaded a few pixels over the original image. I can't figure > out why this is happening. can anyone help ? > > to see the whole page and it's whole cde point your browsers at > > http://www.doconline.com > any help on this would be greatly apreciated > > Vidyut Luther > http://www.doconline.com > E-Mail:vluther@doconline.com -- Crash Pentium - "char x [5] = { 0xf0, 0x0f, 0xc7, 0xc8 }; main () { void (*f)() = x; f(); }" - andy@spray.se
Received on Monday, 2 March 1998 09:44:08 UTC