Click to See Complete Forum and Search --> : Clickable Image Changes Once Clicked


The Air Strange
07-31-2003, 09:55 AM
This is just an example of what I'd like:

On my start-up page, I have a clickable image. When I rollover the image, the image changes to say "enter." I want the image to change again to say "entering..." once the image is clicked.

Also, if possible, to delay the clicked image, so that the next page doesn't immediately load without giving the viewer enough time to read the "entering..." message.

I think this could be done with Macromedia, but I wanted to see if I could produce a similar effect without.

This is the bit of code I have so far:

<html>

Click on box to enter page.

<a href="start.html"
onmouseover="document.enterpic.src=enter.src"
onmouseout="document.enterpic.src=startup.src">
<img src="/ImageName.jpg" name="enterpic" width="118" height="65" border="0"/></a>

</html>

Charles
07-31-2003, 11:50 AM
<a href="http://www.bettiepage.com" onclick="this.firstChild.src = 'http://www.bettiepage.com/images/photos/bikini/bikini7_a.jpg'; setTimeout ('location = \'http://www.bettiepage.com\'', 500); return false"><img alt="enter" src="http://www.bettiepage.com/images/photos/bikini/bikini15_a.jpg"></a>

The Air Strange
08-01-2003, 01:13 PM
Hmm... I couldn't seem to get it to work.

Here is the test page I'm using: http://theairstrange.devbox.net

The box is red, when I rollover it turns yellow, when I click it should turn magenta, but doesn't?

Thanks,
Culley

Charles
08-01-2003, 01:30 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<title>Example</title>
<base href="http://theairstrange.devbox.net/">
<script type="text/javascript" src="loadimages.js"></script>
<a href="start.html" onmouseover="this.firstChild.src = enterculley.src" onmouseout="this.firstChild.src = exitculley.src" onclick="this.firstChild.src = enteringculley.src; setTimeout ('location = \\'http://theairstrange.devbox.net/start.html\\'', 500); return false"><img src="/Images/index1.jpg" alt="enter"</a>

The Air Strange
08-01-2003, 02:20 PM
Okay, I see what I was doing wrong. That's terrific. Thanks a lot for you time and patience.

Culley