#1 (permalink)  
Old 11-07-2002, 05:56 PM
Registered User
 
Join Date: Oct 2002
Location: Dallas, TX
Posts: 2
Send a message via AIM to TopheDaddy
Angry Netscape is EVIL!!! (images in NN)

I was doing a simple image replacement. Originally I had the page setup with a row of thumbnail images and a big "main" picture. When you click a thumbnail the main picture is replaced with the thumb's full size. The images are all different sizes. This worked flawlessly in IE. Netscape had this little issue where the main pic would always posses the same height/width properties as the first image loaded into it. (IE would render the main pic with the h/w properties of the file itself - as I wanted.)

Why?

I read that NN doesn't allow writing to the h/w properties. Ugh!!! So I re-coded the page using div tags and absolute positioning. The bottom layer held the original design structure with the thumbnails. Then there are several hidden layers, with full-size pics, positioned just right. Click on a thumbnail, it hides the currently visible layer and the shows the thumbnail's corresponding layer. (layers with div tags - NOT layer tags)

So this works great! And in both browsers! A ha ha I have conquered Netscape and all its evil!!! Or so I thought. Now none of my rollovers work on the same page!!!! Now this is really strange and hopefully someone can explain this:

document.images.length produces a zero in Netscape. Why can't Netscape find the images? If I take the div tag off the bottom "design" layer, Netscape finds the images. Why do those div tags hide the images from the document??? (IE finds them all perfectly btw)

(I'm testing on IE 5.5 and NN 4.75 on Windows)
Reply With Quote

  #2 (permalink)  
Old 11-11-2002, 08:07 AM
Till's Avatar
Administrator
 
Join Date: Jan 2002
Location: Berlin, Germany
Posts: 1,453
That's kind of tough.

I think if you would do it like this:

Code:
<div id="blah">
...
</div>
whatever's inside the div would be conrolled by:

Code:
document.getElementById("blah")
However. I am not sure how to get the images in between. I've never heard that before - div-tags hiding images in Netscape. Read up on JavaScript here, to find out. The docs are your friend!

Till
Reply With Quote
  #3 (permalink)  
Old 11-13-2002, 10:16 PM
Registered User
 
Join Date: Oct 2002
Location: Dallas, TX
Posts: 2
Send a message via AIM to TopheDaddy
Angry

Well I found virtually NO documentation on the getElementById() function. It's nowhere in my O'Reilly books and after a patient 10 minutes on Google I gave up hope. (Most stuff on the function refers to XML DOM specs.) I did find several examples of it in use though.

But here's how I actually fixed my issue:

if (isNN) {
document.layers["blah"].document.images[...]....
}

Now honestly...how redundant is that? But it works. I found this gem in some code produced by Dreamweaver.


(p.s. Netscape is still evil!)
Reply With Quote
  #4 (permalink)  
Old 11-15-2002, 11:50 AM
tthurgo's Avatar
Moderator
 
Join Date: Jan 2002
Location: Lebanon, PA
Posts: 357
Quote:
Originally posted by TopheDaddy
Well I found virtually NO documentation on the getElementById() function. It's nowhere in my O'Reilly books and after a patient 10 minutes on Google I gave up hope. (Most stuff on the function refers to XML DOM specs.) I did find several examples of it in use though.

But here's how I actually fixed my issue:

if (isNN) {
document.layers["blah"].document.images[...]....
}

Now honestly...how redundant is that? But it works. I found this gem in some code produced by Dreamweaver.


(p.s. Netscape is still evil!)
Tough one. And I totally agree.
__________________
Tom Thurgo
my future is coming on
Reply With Quote
  #5 (permalink)  
Old 02-19-2003, 12:42 AM
Registered User
 
Join Date: Jan 2003
Posts: 34
I always thought Netscape was evil...I was right
__________________
Six Maples Farm
Reply With Quote
  #6 (permalink)  
Old 02-26-2003, 12:10 PM
tthurgo's Avatar
Moderator
 
Join Date: Jan 2002
Location: Lebanon, PA
Posts: 357
Quote:
Originally posted by bsasportznut
I always thought Netscape was evil...I was right
I am surfing with Mozilla right now. I like it. It crashes less than IE6 and I *think* it sends less information about my online activities to Microsoft as well. :driver
__________________
Tom Thurgo
my future is coming on
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -5. The time now is 11:37 PM.

 
Bitrix
Clicky Web Analytics
CloudContacts
Maxtango


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter