?
Solved

Broken img link in Netscape 3.0

Posted on 1998-09-19
8
Medium Priority
?
159 Views
Last Modified: 2013-12-25
I am getting a broken image link on a page in Netscape 3.0 only, works fine in 4.0 of IE and Netscpae. I have run the code thru a validator with no errors showing.

Need help on this one
0
Comment
Question by:GaryZ
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 

Author Comment

by:GaryZ
ID: 1855166
0
 

Author Comment

by:GaryZ
ID: 1855167
0
 
LVL 5

Expert Comment

by:Trevor013097
ID: 1855168
GaryZ,

I believe that the problem is one of the known bugs in Netscape 3.  I think that (and I can't be 100% sure about this as my workaround has failed) we are dealing with multiple reflection here.

The bug is where Netscape 3 reflects a Javascript object multiple times when it is in a nested table.  Your images after adding a debug alert of:

alert(imgDocID.length);

inside your hilite function show that the images length is being reported as 4.  Now your page uses a single nested table and so this reflection should be only once and therefore the length value should be 2, but its 4.

I have a workaround but that workaround doesn't appear to work. And having just tested the workaround in its own code it doesn't work there either (thanks Netscape for the useless fix!!).

The workaround is this:
<!--

 Navigator 3.0X

Images in table cells are reflected into JavaScript twice.
(Or four times if nested in a two-level table, etc.)

     Workaround: use the array that results from multiple reflection in JS, as in this example based on
     Bram Cohen's (bram@earthweb.com) test case:


//-->

        <html>
        <title>Nested Tables with img src Change Bug</title>
                                                <head>
                                                </head>
        <body>
        <table width="100%" height="100%">
        <tr><td align=center valign=middle>
        <table><tr><td><img name="myImage" src="first.gif"></td></tr></table></td></tr>
        </table>
        <script>
        with (document) {
            if (myImage.length){
                myImage[myImage.length-1].src = "second.gif";
            } else {
                myImage.src = "second.gif";
            }
        }
        </script>
        </body>
        </html>

Everything appears to work okay, but if you put in a couple of debug alerts to see which part of the if...else condition gets executed you find out that it is the else, meaning that the reflection doesn't happen, but it should have because the image is within a nested table.

Now your page is giving a very difinate reflection, try this in your page and you'll see what I mean:

function hiLite(imgDocID,imgObjName) {
  if (document.images) {
     alert(imgDocID.length);
     document.images[imgDocID].src = eval(imgObjName + ".src");
  }
}

Now here is where I am stumped because the bug is in my opinion not solvable.  The image you get in your page which is broken is definately an instance of reflection because right-clicking on it does provide an image options like view, save etc.

I think the best thing would be to rewrite the page to have no nested tables.

Sorry I can;t help further.  I'll be interested to see if anyone else has a solution to this.

Trevor.


0
7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

 
LVL 5

Expert Comment

by:Trevor013097
ID: 1855169
GaryZ,

Please read the 3rd from last paragraph as:

Now here is where I am stumped because the bug is in my opinion not solvable.  The image you get in your page which is broken is definately an instance of reflection because right-clicking on it does   NOT   provide an image options like view, save etc.

Sorry.

Trevor.


0
 
LVL 28

Accepted Solution

by:
sybe earned 1200 total points
ID: 1855170
You HAVE a broken image: red_dot.gif. When I ask for it, then I get the message, that that file is not present on the server.

The reason that it shows in NS3, is that NS3 shows a very clear broken image sign. The other browser you mention don't have such an ugly broken image sign.

Your HTML code is not the reason, and there is no bug in NS3. Just put red_dot.gif on the server.
0
 
LVL 5

Expert Comment

by:Trevor013097
ID: 1855171
sybe,

Well, I don't know.  Trying to find something more complicated than was actually the case.  Hey who would have thought a missing image was a 300 pointer? Suppose that's why I was looking deeper.

>> "Your HTML code is not the reason, and there is no bug in NS3."

NS3 does have a bug with nested tables (a well known bug).


Trevor.


0
 

Author Comment

by:GaryZ
ID: 1855172
Boy did I miss that one. It has had me bugged for 2 weeks. I thought it was having a problem with white.gif

Thanks a lot.
0
 

Author Comment

by:GaryZ
ID: 1855173
The reason it was worth 300 was I needed an answer NOW :-)

I have to have the site up tomorrow.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question