|
-
Dec 30th, 2000, 05:31 AM
#1
Thread Starter
Hyperactive Member
Hi,
I want to make an image rollover using Javascript, and I have the images. The only thing is it is a rollover for a table's td background property. He is what I have so far.
<html>
<head>
<SCRIPT LANGUAGE=JAVASCRIPT>
<!--
var imgButton0 = new Image();
var imgButton1 = new Image();
imgButton0 = "images\side.jpg"
imgButton1 = "images\11.jpg"
}
function Swap(num) {
if ((num == "0")) {document.imgButton.background = imgButton0;}
if ((num == "1")) {document.imgButton.background = imgButton1;}
return true;
}
-->
</SCRIPT>
</head>
<body>
<table>
<tr><a OnMouseOver="Swap(0)" OnMouseOut="Swap(1)">
<td background="images\side.jpg" name="Button"></a>
</tr>
</table>
</body>
</html>
I don't know where I am going wrong.
Visual Basic 6.0 Enterprise
Visual C++ 6.0 Professional
Wak 
-
Dec 30th, 2000, 08:38 AM
#2
Frenzied Member
well first of all, you don't close your td
and u should put your <a> in your <td>, cuz in
netscape it will not work.
and put <a href="#">
try this and let me know!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|