View Full Version : Changing img width & height makes JS fail!?

03-06-2005, 03:56 PM
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>";

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

03-07-2005, 03:28 AM
Does it also 'fail' when setting those as style properties?

03-07-2005, 03:40 AM
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

03-07-2005, 03:47 AM
this would be a whole lot easier if we could see the actual page in question, or you showed us all of your code