Web Analytics Made Easy -
StatCounter Works in IE but not in NS Please help! - CodingForum

Announcement

Collapse
No announcement yet.

Works in IE but not in NS Please help!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Works in IE but not in NS Please help!

    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
    Attached Files
    PhotoJoe
    New to the CF scene
    Last edited by PhotoJoe; Jun 30, 2002, 07:14 AM.
    Photo Joe

    http://www.bottomlee.com

  • #2
    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/m...avascript.html

    but I haven't found the answer yet.
    Photo Joe

    http://www.bottomlee.com

    Comment


    • #3
      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.
      Photo Joe

      http://www.bottomlee.com

      Comment

      Working...
      X