Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Vancouver, WA
    Posts
    233
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Changing img width & height makes JS fail!?

    I have discovered the most obscure problem in my four years of amature coding. The problem occurs with basic HTML code, but it's only causing a problem when being used to assemble a page with JavaScript.

    It took me many days to find the code that causes the problem partly because it's such basic HTML code and I can't believe it is the problem so I was looking all around it. Also because it works fine for me with both IE and Netscape and for all of my 15,000 users except for nine that are experiencing the problem for whom the page being created with JavaScript fails to complete.

    Here is the code:

    // Hypnosis banner
    b1="<tr><td align=center>";
    b1+="<a href='faqs_hypnosis.html' target='_top'><img src='banners/hypnosis_468x60.jpg' width=461 height=65 border=1></a>";
    b1+="</td></tr>";

    No, actually that is the code that works.

    If I change width to width=468 it still works.

    If I change height to height=60 it still works.

    But if I change both width and height it fails. I just can't believe this!

    I tried this again and again, going back to the code that worked and carefully changing just these two numbers and every time it fails... for the three of the nine people that have actively been testing this for me since I can't make it fail on my PC.

    Also I tried using quotes (width='468') because I see that (but have never used it) and it didn't make a difference.

    Very, very frustrated. Thank you, Peter

  • #2
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Does it also 'fail' when setting those as style properties?
    *this message will self destruct in n-seconds*

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Vancouver, WA
    Posts
    233
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Yes, just tried that.

    It was suggested that the problem might be anti-ad software as the sizes I am specifying are for a standard banner, 468x60. Then someone suggested getting around it by specifying the dimensions in a style guide so I tried that and it failed.

    Next I am going to try just leaving out the dimensions altogether.

    Thanks, Peter

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    this would be a whole lot easier if we could see the actual page in question, or you showed us all of your code


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •