DVD Talk Forum

DVD Talk Forum (https://forum.dvdtalk.com/)
-   Tech Talk (https://forum.dvdtalk.com/tech-talk-10/)
-   -   Any Javascript gurus out there: need help with 3rd Image Rollovers in Netscape (https://forum.dvdtalk.com/tech-talk/342302-any-javascript-gurus-out-there-need-help-3rd-image-rollovers-netscape.html)

Pointyskull 01-20-04 08:58 AM

Any Javascript gurus out there: need help with 3rd Image Rollovers in Netscape
I'm using some 3rd image rollover code, and it works fine in IE, but not in Netscape

If anyone JS gurus want to take a peek at the code, or offer a pointer, I'd appreciate it:


Lampei 01-20-04 11:38 AM

Which version of Nutscrape?

Pointyskull 01-20-04 11:44 AM

It's not working in 4.7, which is the only version I currently am testing with

Lampei 01-20-04 01:12 PM

Are you getting any kind of javascript error being thrown? Which line?

Pointyskull 01-20-04 01:17 PM

Nope, no errors.
The javascript third image mouseover just doesn't respond at all in Netscape

Lampei 01-20-04 02:49 PM

I managed to check it out on a co-workers PC (I only have Firebird...no nutscrape :)). It may be that you have not added either an <a href= or <a name= to the anchor tags. Nutscrape may be a bit stricter in that sense that IE or Firebird is. That was about all I could see that could be affecting it. Also, why are you using 2 different methods to swap out images? The fireworks created section should work equally well for any number of images. You can use the same reference in the a href and image tags in the main section (just make sure to use the same naming conventions...i.e.

<A href="index_projects.htm" **********="MM_swapImgRestore()" ***********="MM_swapImage('bigImage1','','images/projects_development_patches/thumb_01_large.jpg',1)"><img name="bigImage1" src="images/projects_development_patches/thumb_01_small.jpg" width="70" height="65"></a>

And that should swap out the other images too (without having to create your own swap function)

Pointyskull 01-20-04 04:32 PM

Originally posted by Lampei
Also, why are you using 2 different methods to swap out images?
Because instead of the standard rollover (which I'm using for the navigation), I'm swapping out a third image on the center of the page, dependent on which thumbnail is moused over.

Lampei 01-21-04 09:55 AM

You should still be able to use the same function for the rollover though. All that function does is tell the browser to switch out the image (that you're passing in the function call) with another image (that you're also passing in the same function call). Even though the section of the page is different, you can still use that function :) I've done a similar thing on this page http://www.closetmaid.com/Look/Glamo...oms.cfm?room=2 The nav structure on the left uses the same function call for the rollovers as the ones in the center of the page, but switches different images (as I'm passing different images and paths to swap).

Pointyskull 01-21-04 10:14 AM

Originally posted by Lampei
You should still be able to use the same function for the rollover though.
Well, you learn something new every day. I know enough JS to be dangerous....

Thanks for the tip, and I will attempt to modify my existing code. Based on your example, it should work

Lampei 01-21-04 11:27 AM

[crosses fingers] :)

Pointyskull 01-21-04 12:10 PM

Originally posted by Lampei
[crosses fingers] :)
I just need to figure out how much of the actual function script I need to 'borrow'.... -eek-

Lampei 01-21-04 01:07 PM

You should be able to use this code I posted in a few posts prior.

<a href="index_projects.htm" **********="MM_swapImgRestore()" ***********="MM_swapImage('large_image_name_to_swap','','/path/to/image/to/swap.jpg',1)">

Pointyskull 01-23-04 03:57 PM

Lampei -

This test page - with your borrowed script- works fine in IE, but no 3rd image rollover in Netscape:


I borrowed your entire script (which has all the menu functions that I don't need - but I wasn't sure what to cut)

IMG NAME="swapit" src="images/projects_development_patches/dev_body.jpg" width="405" height="359"

a **********="MM_swapImgRestore();" ***********="MM_swapImage('swapit','','/images/projects_development_patches/thumb_01_large.jpg',1);">img src="/images/projects_development_patches/thumb_01_small.jpg" width="70" height="65"></a

This is making me nuts..... :(

Lampei 01-23-04 04:27 PM

Try adding the attribute href="#" or href="javascript:void(0)" or name="add_some_name_here" to the &lt;a tag. Old versions of netscape were very finicky and if all of the necessary attributes weren't present, it wouldn't work correctly. By the way, you should be able to remove the "function mmLoadMenus()" without anything bad happening :) You may also want to move the &lt;script&gt; between the &lt;head&gt; tags as that's where it really should go (although I don't always follow that rule :)), but I figure we should try to remove anything that could be causing problems at this point ;)

the aftermath 01-23-04 05:27 PM

The bigger question is... Is Patches somehow related to Pooh? ;)

leepyswetr 01-23-04 07:54 PM

Your original code is fine; however you must have an href for Netscape (at least 4.7 which I'm using). As Lampei said, try href="javascript:void(0)" and add border=0 to the corresponding img tags. If you don't want the javascript to show up in the status bar, add ";window.status='';return true;" to the end of the ***********= segment, minus the quotes.

All times are GMT -5. The time now is 06:42 AM.

Copyright 2018 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.