|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Javascript with div tag in Netscape
I am having a problem getting my javascript to work inside a div tag in Netscape 4.0.
I have a layer that appears when a user clicks a link. The layer has 4 thumb nail pictures above a large picture. The user can click on the thumbnails to see a larger version below. In IE, my code works. In Netscape, my code does not work. Thanks for any help. This is very frustrating. Javascript Code: (see div code below) <script language="javascript"> <!-- function SwapPic(num) { if (num == 1){document.large2.src="../../images/irp/recos/champion/corporate/details1_big.jpg"} else if (num == 2){document.large2.src="../../images/irp/recos/champion/corporate/details2_big.jpg"} else if (num == 3){document.large2.src="../../images/irp/recos/champion/corporate/details3_big.jpg"} else if (num == 4){document.large2.src="../../images/irp/recos/champion/corporate/details4_big.jpg"} } //--> </script> Div Code: <div id="div1" style="position:absolute; visibility:hidden; top:439; left:160;"> <table width="400" cellspacing="0" cellpadding="0" border="0"> <tr> <td><a href="javascript:SwapPic(1)"><img src="../../images/irp/recos/champion/corporate/details5_small.jpg" width="96" height="66" alt="" border="1" /></a></td> <td><a href="javascript:SwapPic(2)"><img src="../../images/irp/recos/champion/corporate/details6_small.jpg" width="96" height="66" alt="" border="1" /></a></td> <td><a href="javascript:SwapPic(3)"><img src="../../images/irp/recos/champion/corporate/details7_small.jpg" width="96" height="66" alt="" border="1" /></a></td> <td><a href="javascript:SwapPic(4)"><img src="../../images/irp/recos/champion/corporate/details8_small.jpg" width="96" height="66" alt="" border="1" /></a></td> </tr> </table> <img src="../../images/irp/recos/champion/corporate/whitefill.gif" width="1" height="5" alt="" border="0" /><br> <img src="../../images/irp/recos/champion/corporate/details5_big.jpg" name="large2" width="398" height="300" alt="" border="0" /></div> |
|
#2
|
|||
|
|||
|
Gee, this has a familiar ring to it...
If <img name="large2" ...> is inside "div1", you have to reference it as mentioned earlier, as a property of document.div1.document(.large2) adios Last edited by adios : October 15th, 2001 at 09:44 PM. |
|
#3
|
|||
|
|||
|
Unfortunately, that is not working. Any insight as to why it isn't working?
|
![]() |
| Viewing: Dev Shed Forums > Web Design > JavaScript Development > Javascript with div tag in Netscape |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|