[Javascript] A loop for this script? Is it really possible?

Timothy White weirdit at gmail.com
Wed Jul 6 04:40:07 CDT 2005


Ok, I'm not 100% sure of what your trying to do.
>From what it looks like you want to change the value (or add it) of
onmouseover to execute a function.
Firstly is the function that you are putting in there dynamic?
I think that you have two options. First, create the function and use
document.getElementById(id).onmouseover = "function();";
Or use document.getElementById(id).setAttribute("onmouseover", "function();");
Try something along those lines.

Or as I said, I don't 100% understand you.

Hope it helps

Tim



More information about the Javascript mailing list