pdanese
asked on
fancy checkboxes or other toggle-switches
Hi,
is it possible to use javascript (or any other web-development language to make a web-page that contains a toggle switch that changes color upon being pressed.
for example, press once on a square and the square goes from white to black. press again and it goes from black to white. etc. etc.
basically, it behaves like a checkbox, but maybe is easier to see visually.
Thanks for any help!
is it possible to use javascript (or any other web-development language to make a web-page that contains a toggle switch that changes color upon being pressed.
for example, press once on a square and the square goes from white to black. press again and it goes from black to white. etc. etc.
basically, it behaves like a checkbox, but maybe is easier to see visually.
Thanks for any help!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Oh dear I was coding late last night and the code I gave you looks terrible, this is better
<table bgColor="#FF0000" width="30" onclick="(/ff0000/.test(bg Color))?bg Color='blu e':bgColor ='red'">
<tr>
<td> </td>
</tr>
</table>
Alex surely you can add formName.submit() to the onclick
Xx
<table bgColor="#FF0000" width="30" onclick="(/ff0000/.test(bg
<tr>
<td> </td>
</tr>
</table>
Alex surely you can add formName.submit() to the onclick
Xx
yep, not thinking straight! soz
looking at the code I submitted late last night neither was I. :-)
are you wanting it to be available for submitting a form (don't think it's possible) or just as an aesthetic thing (Which X's code wil provide without any problem)