JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 15th, 2001, 03:56 PM
bramsey bramsey is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: USA
Posts: 226 bramsey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 40 m 35 sec
Reputation Power: 13
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>

Reply With Quote
  #2  
Old October 15th, 2001, 07:17 PM
adios adios is offline
Senior Citizen
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2001
Location: leftcoast
Posts: 2,019 adios User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 15
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

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.div1.document(.large2)

adios

Last edited by adios : October 15th, 2001 at 08:44 PM.

Reply With Quote
  #3  
Old October 16th, 2001, 08:24 AM
bramsey bramsey is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2000
Location: USA
Posts: 226 bramsey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 40 m 35 sec
Reputation Power: 13
Unfortunately, that is not working. Any insight as to why it isn't working?

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Javascript with div tag in Netscape

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap