You've got the basic idea, but your code is messed up: What's with the asterix's? I don't think those are legal characters for function names... or is that a curse word topB1TCHange - I get it. Also, you have an extra ")" in your code:
Code:
function
switchImage(name) {
if (document.images) {
document.topbit.src = name + ".jpg";
}
}
in your first example, you need the image location in quotes:
document.topbit.src="01bit.jpg";
as well as when you call it:
onmouseover ="switchImage('longbit_gens');"
if they don't have quotes around them it's a variable, not a string.
Last edited by funkdaddu : 01-25-2006 at 01:50 PM.
|