JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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, 04: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: 9
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, 08: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: 10
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 09:44 PM.

Reply With Quote
  #3  
Old October 16th, 2001, 09: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: 9
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


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

 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT