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 March 8th, 2001, 05:06 PM
devildel devildel is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Posts: 6 devildel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Ok i want an image to swap when i do a rollover; I get eh rollover but no image swap. heres my code can some please tell me what im doing wrong or what im missing; Im not pulling an error so its really making me NUTS!!




<script language="javascript">
function activate_multi(imgName) {
document[imgName].src = eval(imgName+ "on.src");
document["garcia_lives"].src = eval(imgName + "garcia_lives.src");
}

function deactivate_multi(imgName) {
document[imgName].src = eval(imgName+ "off.src");
document["garcia_lives"].src = "/peopleparties/polls/RCW/images/preroll_highlight.gif";
}


afirston = new Image();
afirstoff = new Image();
afirstgarcia_lives = new Image();
afirston.src = "/peopleparties/polls/RCW/images/julia1_roll.jpg";
afirstoff.src = "/peopleparties/polls/RCW/images/julia1_off.jpg";
afirstgarcia_lives.src = "/peopleparties/polls/RCW/images/julia_valentino.jpg";

asecondon = new Image();
asecondoff = new Image();
asecondgarcia_lives = new Image();
asecondon.src = "/peopleparties/polls/RCW/images/julia2_roll.jpg";
asecondoff.src = "/peopleparties/polls/RCW/images/julia2_off.jpg";
asecondgarcia_lives.src = "/peopleparties/polls/RCW/images/julia_blass.jpg";

athirdon = new Image();
athirdoff = new Image();
athirdgarcia_lives = new Image();
athirdon.src = "/peopleparties/polls/RCW/images/julia3_roll.jpg";
athirdoff.src = "/peopleparties/polls/RCW/images/julia3_off.jpg";
athirdgarcia_lives.src = "/peopleparties/polls/RCW/images/julia_kors.jpg";

afourthon = new Image();
afourthoff = new Image();
afourthgarcia_lives = new Image();
afourthon.src = "/peopleparties/polls/RCW/images/julia4_roll.jpg";
afourthoff.src = "/peopleparties/polls/RCW/images/julia4_off.jpg";
afourthgarcia_lives.src = "/peopleparties/polls/RCW/images/julia_laurent.jpg";


//-->
</SCRIPT>

<body bgcolor="#999999" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><img name="garcia_lives" src="/homepage/images/preroll_highlight.gif" width="100" height="175" border="0"></td>
<td><img src="/globalimages/spacer.gif" height="10" width="3" border="0"></td>
<td valign="top" >
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="#" target="_parent" onMouseOver="activate_multi('afirst')" onMouseOut="deactivate_multi('afirst')"><img name="afirst" src="/peopleparties/polls/RCW/images/julia1_off.jpg" width="55" height="87" border="0"></a></td>
<td><img src="/globalimages/spacer.gif" height="10" width="3" border="0"></td>
<td><a href="#" target="_parent" onMouseOver="activate_multi('asecond')" onMouseOut="deactivate_multi('asecond')"><img name="asecond" src="/peopleparties/polls/RCW/images/julia2_off.jpg" width="55" height="87" border="0"></a></td>
</tr>
<tr>
<td colspan="3"><img src="/globalimages/spacer.gif" height="3" width="10" border="0"></td>
</tr>
<tr>
<td><a href="#" target="_parent" onMouseOver="activate_multi('athird')" onMouseOut="deactivate_multi('athird')"><img name="athird" src="/peopleparties/polls/RCW/images/julia3_off.jpg" width="55" height="87" border="0"></a></td>
<td><img src="/globalimages/spacer.gif" height="10" width="3" border="0"></td>
<td><a href="#" target="_parent" onMouseOver="activate_multi('afourth')" onMouseOut="deactivate_multi('afourth')"><img name="afourth" src="/peopleparties/polls/RCW/images/julia4_off.jpg" width="55" height="87" border="0"></a></td>
</tr>
</table>
</td>
</tr>
</table>

Reply With Quote
  #2  
Old March 8th, 2001, 07:35 PM
Jonathon's Avatar
Jonathon Jonathon is offline
T-Shirt Tragic
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2001
Location: Melbourne, Australia
Posts: 886 Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level)Jonathon User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 6 h 53 m 39 sec
Reputation Power: 320
Send a message via Skype to Jonathon
what happens if you remove the leading forward slash from your pathnames?

for example the pathname:-
"/peopleparties/polls/RCW/images/preroll_highlight.gif"

perhaps should read as:-
"peopleparties/polls/RCW/images/preroll_highlight.gif"

Reply With Quote
  #3  
Old March 9th, 2001, 04:20 AM
stardotstar stardotstar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Posts: 63 stardotstar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Your code seems more complicated than it should be.
Goto this site http://www.wsabstract.com/script/sc...different.shtml

- hopefully that will help you.

Reply With Quote
  #4  
Old March 10th, 2001, 09:17 AM
devildel devildel is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Posts: 6 devildel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thanks

of course one of the main reasons i couldnt figure this out was b/c i was being interrupted EVERY 2 seconds . I figured it out once everyone left and i got a moment to actually LOOK at the code; In a nutshell I kept using the same call for the function to perform for every set of images; once i created seperate id's to call the rollovers then every thing was chedder =). thanks for the assists offered!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > ARRRGH DHTML ANGER

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