This should do the trick:
<script language="javascript">
var bState = false;
function changeState(rButton) {
if (bState == false) {
bState = true;
rButton.style.background="
}
else if (bState == true) {
bState = false;
rButton.style.background="
}
}
</script>
<input name="button1" style="background:#0000FF;
If you need it saving to a database, i'd suggest using a html hidden value, changing that with the buttonclick.
Keep in mind you could change anything with the button click, not just background color :)
Main Topics
Browse All Topics





by: ThGPosted on 2003-11-28 at 09:48:01ID: 9838935
sorry for typo
s/legaly/legacy/