HTML Programming
 
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 DesignHTML Programming

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 September 27th, 1999, 11:08 AM
jermy
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I have a page set with images for links and onmouseover to change the image when the mouse is over it (of course). The problem is, when the page loads, none of the images load. When I put the mouse over where one goes, I get the onmouse image, when I move the mouse, I get the offmouse image that should have come up when the page loaded.

It does this in Netscape and in Explorer.

The images are set to preload so I can't figure out what the problem could be.

TIA,

Jeremy

Reply With Quote
  #2  
Old September 28th, 1999, 01:35 AM
Bjoern
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hi!

Sounds at first like you haven´t put the images into the HTML part of the page, but since you can do an imagechange the should at least be a name-reference in HTML. Could you copy the mouseover parts of your code here or provide the url, so i can have a look?

take care
Björn

Reply With Quote
  #3  
Old September 28th, 1999, 03:49 PM
jermy
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I don't understand why it won't work, especially considering it worked for a day and I don't recall making any changes.

Thanx,
Jeremy

<html>
<head><title></title>

<script language="JavaScript">
<!--

if (document.images) {
image1on = new Image();
image1on.src = "tabs/tab1_1.gif";

image2on = new Image();
image2on.src = "tabs/tab2_2.gif";

image3on = new Image();
image3on.src = "tabs/tab3_3.gif";

image4on = new Image();
image4on.src = "tabs/tab4_4.gif";

image5on = new Image();
image5on.src = "tabs/tab5_5.gif";


image1off = new Image();
image1off.src = "tabs/tab1.gif";

image2off = new Image();
image2off.src = "tabs/tab2.gif";

image3off = new Image();
image3off.src = "tabs/tab3.gif";

image4off = new Image();
image4off.src = "tabs/tab4.gif";

image5off = new Image();
image5off.src = "tabs/tab5.gif";

}

function changeImages() {
if (document.images) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
}
}
}

// -->
</script>

</head>

<body>


<center><table border=0 cellpadding=0 cellspacing=0 width=600>
<tr>
<td align=middle colspan=5><h3><IMG src="picture.jpg" border="0"></td>
</tr>

<tr>
<td><A href="doc1.asp" onMouseOver="changeImages('image1', 'image1on')" onMouseOut="changeImages('image1', 'image1off')"><img name="image1" src="tab1.gif" alt="Documents" border=0 width="100" height="23"></a></td>

<td><A href="poc.asp" onMouseOver="changeImages('image2', 'image2on')" onMouseOut="changeImages('image2', 'image2off')"><img name="image2" src="tab2.gif" alt="POC List" border=0 width="100" height="23"></a></td>

<td><A href="panel.asp" onMouseOver="changeImages('image3', 'image3on')" onMouseOut="changeImages('image3', 'image3off')"><img name="image3" src="tab3.gif" alt="Panel" border=0 width="200" height="23"></a></td>

<td><A href="cal/default.asp" onMouseOver="changeImages('image4', 'image4on')" onMouseOut="changeImages('image4', 'image4off')"><img name="image4" src="tab4.gif" alt="Calendar" border=0 width="100" height="23"></a></td>

<td><A href="hist.asp" onMouseOver="changeImages('image5', 'image5on')" onMouseOut="changeImages('image5', 'image5off')"><img name="image5" src="tab5.gif" alt="History" border=0 width="100" height="23"></a></td>
</tr>

</table></center></td>
</tr>

</table></center>


</body>
</html>

Reply With Quote
  #4  
Old September 29th, 1999, 02:39 AM
Bjoern
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hi there!

I think whats wrong is, that you forgot to
put the right path for the image source
into the image tag.
maybe i´m wrong(since i don´t know your
directory structure), but it seems that it
should be:
<img name="image2" src="tabs/tab2.gif" alt="POC List" border=0 width="100" height="23">

I hope that´s it URL
greetings
Bjoern

Reply With Quote
  #5  
Old September 29th, 1999, 08:27 AM
jermy
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
<blushing>OOOOPS</blushing>

Thanks. If you saw what some of my code looks like, you would understand how a slip like that could happen (the above is one of my cleaner sets of code).

Thanx again,
Jeremy

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > images not appearing until onmouseover

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