Hi OmniX,
Your code has a few problems. First, you are retrieving the Id, not the name ("document.getElementById"), so the controls will not be found properly. Second, since they all have the same name, the code won't know which one to modify. A better approach is to pass a reference to "this", which means the HTML control that actually called the function:
<input value="1" onMouseOver="mouseOver(this)" type="submit" name="input_submit">
<input value="2" onMouseOver="mouseOver(this)" type="submit" name="input_submit">
<input value="3" onMouseOver="mouseOver(this)" type="submit" name="input_submit">
function mouseOver(theElement) {
theElement.style.color = "#00FF00";
}
~ mellamokb
mellamokb, this was the concept that I was thinking of but couldnt get it down on paper.
Works perfectly, Thanks. =)
Reputation Points: 31
Solved Threads: 10
Practically a Master Poster
Offline 652 posts
since Dec 2007