Hi, my issue is I don’t want to use an onblur function, I want to have a button change CSS styles, but only when a specific button is clicked, I was stuffing around with ElementbyId options, but can’t seem to get anything to work.
Here is s stripped down version of my code, the last input is my attempt to get it to work.
[CODE]<html>
<head>
<style type=”text/css”>
input {color: #000; background: #ffa20f; border: 2px outset #d7b9c9}
.sta {background: #FF0000; border: 2px outset #DD0000;}
.end {color: #000; background: #ffa20f; border: 2px outset #d7b9c9}
</style>
<script type=”text/javascript” language=”JavaScript”>
function Bcber(s)
{
if (“INPUT”==event.srcElement.tagName)event.srcElement.className=s
}
</script>
</head>
<body>
<input type=”button” Id=”Is01″ value=”Show” onfocus=”Bcber(‘sta’);” onblur=”Bcber(‘end’);” />
<input type=”button” Id=”Is02″ value=”Hide” />
<br />
<input type=”button” Id=”Is03″ value=”Show” onfocus=”Bcber(‘sta’);” />
<input type=”button” Id=”Is04″ value=”Hide” />
<br />
<input type=”button” Id=”Is05″ value=”Show” onfocus=”Bcber(‘sta’);” />
<input type=”button” Id=”Is06″ value=”Hide” onfocus=”document.getElementById(‘Is05’).Bcber(‘end’)” />
</body>
</html>
Any idea’s … again, I want to change the CSS on focus, and change it back to normal onfocus of a different specific button (only the show ones) …
Thanks in advance. ?