Forum Moderators: open

Message Too Old, No Replies

Changing width & height causes JS to fail!?

         

peterinwa

3:43 pm on Mar 6, 2005 (gmt 0)

10+ Year Member



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

Bernard Marx

4:50 pm on Mar 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



"..except for nine that are experiencing the problem "

Q: What browser are they using?

It could be that these specific image dimensions trigger some anti-ad software.

orion_rus

7:23 pm on Mar 6, 2005 (gmt 0)

10+ Year Member



cut this off:
width=461 height=65 border=1
and change it to this
style='width:461px;height:65px;border:1px solid'

good luck to you