View Full Version : Help!!!!!!!!!!!!!!!


Jasmine1234
07-12-2003, 02:39 AM
I know i'm probably doing a million things wrong, sense i'm not too good at this stuff yet...
Here is the code: It is for the images changing over mouseover and I don't know what i'm doing =(

<HTML>
<HEAD><script language="JavaScript">
<!-- Hide the script from old browsers --

img0_on = new Image(100,200);
img0_on.src="owner1.gif";
img0_off = new Image(100,200);
img0_off.src="owner.gif";

img1_on = new Image(100,200);
img1_on.src="owner1.gif";
img1_off = new Image(100,200);
img1_off.src="owner.gif";


function over_image(parm_name)
{
document[parm_name].src = eval(parm_name + "_on.src");
}
function off_image(parm_name)
{
document[parm_name].src = eval(parm_name + "_off.src");
}
// --End Hiding Here -->
</script>
<TITLE>Your page title goes here</TITLE>
</HEAD>
<BODY>
<a href="C:\My Documents\bolt.html" onmouseover="over_image('img0');" onmouseout="off_image('img0')"> <img src="owner1.gif" border="0" name="img0"> </a>
</BODY>
</HTML>

sebluver
07-12-2003, 03:28 AM
Well, first of all, you can't link things to your hard drive.

Do you have a link to the page?

Jasmine1234
07-12-2003, 03:59 AM
I was just trying it on notepad. It's not on a website...

bellportal
07-12-2003, 07:05 AM
You could try a simpler way:

<a href="C:\My Documents\bolt.html" onmouseoverjavascript:src='img0.gif javascript:src='img0_off.gif '"> " onmouseout="'"> <img src="owner1.gif" border="0" name="img0"> </a>

To implement this:

1) Remove all other javascript coding
2) Copy this code into the space where you want the link
3) Change the parts in blue to the locations of your pictures
4) View the results on the screen and smile smugly!

HTH,

bellportal
07-12-2003, 07:12 AM
Sorry for the double post, but the 5 mins. ran out on me!

THIS is the correct code and instructions:

You could try a simpler way:

<a href="C:\My Documents\bolt.html" onmouseover="javascript:src='img0.gif'" onmouseout="javascript:src='img0_off.gif'"> <img src="owner1.gif" border="0" name="img0"> </a>

To implement this:

1) Remove all other javascript coding
2) Copy this code into the space where you want the link
3) Change 'img0.gif' and 'img0_off.gif' to the locations of your images
4) View the results on the screen and smile smugly!

HTH,

Jasmine1234
07-12-2003, 03:30 PM
How do I find the locations of the images?

sebluver
07-12-2003, 04:33 PM
If it's in your documents, then the location would be C:/My Documents/img0.gif

Jasmine1234
07-12-2003, 05:10 PM
I have to be doing something wrong again, because it's not working =(

<a href="C:\My Documents\bolt.html" onmouseover="javascript:src='C:/My Documents/owner1.gif'" onmouseout="javascript:src='C:/My Documents/owner.gif'"> <img src="owner1.gif" border="0" name="img0"> </a>