PDA

View Full Version : Works in IE but not in NS Please help!


PhotoJoe
06-30-2002, 11:12 AM
I ask for some help on the Post/request a Script sub group. I never did get a reply. But while I was waiting I started working on changing the VBscript to JavaScript. I'm happy to say I now have a working JavaScript that does the same thing that the VBscript was doing. The only thing is that it only works for IE.

When I run it with NS I get javascript error line 47: pic is not defined. "pic" is the Id for my background image

At line 47: cx = wW/3-pic.width
48: cy = wH/3-pic.height
61: pic.style.left=x;
62: pic.style.top=y;

So it looks like NS does not like the terms pic.width, pic.height, pic.style.left and pic.style.top So what should I use for Netscape.

I have attached the complete page as a text file and here is the url to see how the page works right now:

http://www.bottomlee.com/stationery 1.htm

PhotoJoe
07-01-2002, 05:00 AM
Thanks Dave Clark,

That fix the first two javascript errors, but it is now stopping on these to lines. These two lines are used by the script to change the position of the moving gif file. It tells it where to place the top left corner of the gif. This is changed every 20 ms so that the gif ends up moving in a clockwise circle.

61: pic.style.left=x;
62: pic.style.top=y;

So what do you use to tell Netscape where the top left corner of the gig should be?

I have been looking through the online JavaScript documentation at:

http://developer.netscape.com/docs/manuals/index.html?content=javascript.html

but I haven't found the answer yet.

PhotoJoe
07-01-2002, 04:56 PM
Thanks again Dave.

I found some information in the online docs that you have listed in your sig.

I now have the gif image inside a layer using <SPAN ID=butterfly> </SPAN>

But now getting a different javascript error code with NS only. I create a new thread for that error message This is the link to that new thread. (http://www.codingforums.com/showthread.php?threadid=1106)