Solved

Broken img link in Netscape 3.0

Posted on 1998-09-19
8
149 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
  • 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 28

Accepted Solution

by:
sybe earned 300 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
erros on link  checking 2 42
Menu Inconsistent 3 21
Element alignment and word wrapping 9 25
razorCMS: Change Menu Font 4 24
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This video teaches users how to migrate an existing Wordpress website to a new domain.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now