Solved

Broken img link in Netscape 3.0

Posted on 1998-09-19
8
154 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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 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

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
original content 7 121
Web Easy Professional 10 Embedded Facebook 1 67
Passing client data from form to server 5 55
.CSS HTML Help 3 55
Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

739 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