The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> HTML Programming
|
images not appearing until onmouseover
Discuss images not appearing until onmouseover in the HTML Programming forum on Dev Shed. images not appearing until onmouseover HTML Programming forum covering discussions of HTML and XHTML, as well as HTML-related issues such as writing W3C Compliant code. Use HyperText Markup Language for building websites.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

September 27th, 1999, 11:08 AM
|
|
Guest
|
|
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
|

September 28th, 1999, 01:35 AM
|
|
Guest
|
|
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
|

September 28th, 1999, 03:49 PM
|
|
Guest
|
|
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>
|

September 29th, 1999, 02:39 AM
|
|
Guest
|
|
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
|

September 29th, 1999, 08:27 AM
|
|
Guest
|
|
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
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|