|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi!!
I know how to use forms , but I want to show information about something (from the tables) and want to use a checkbox to show if the value is 1 or 0. U can click the checkbox on and off .. I want the user not to be able to turn it on or of ... Can u give me the help?? thankzz Anita |
|
#2
|
||||
|
||||
|
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by anita20:
Hi!! U can click the checkbox on and off .. I want the user not to be able to turn it on or of ... [/quote] It depends what method you are using to determine if the box is on or off. If it needs to be done while the page is loaded then I don't think it is possible, if it should be done while the page is load[B]ing[B] (with a server side script) then you can skip the form elements and just put in graphics of the checked and unchecked boxes. |
|
#3
|
|||
|
|||
|
i think u could do this, depending on the value from the database, you could set the check box to 1 or 0 n then disable it, i think this should work out..
meera |
|
#4
|
|||
|
|||
|
Try this, if you don't want the checkbox to be checked:
<input type=checkbox onclick="this.checked=false;"> replace false by true, if you want to keep it selected. haven't tested it, so it might need modifications. |
|
#5
|
|||
|
|||
|
I don't know of a method using HTML to disable the ability to turn a checkbox on or off. If you use Javascript you can force the browser to read the checkbox's value as true no matter what though.
Michael |
|
#6
|
|||
|
|||
|
You can use the "DISABLED" and "READONLY" attributes in INPUT tags to prevent the user from changing the element's value.
By using either attribute, the element and it's value is visible on the page. By specifying "READONLY", the element remains in the tab-order of the page and a name/pair for the element is submitted with the rest of the form data. The "DISABLED" attrbitue removes the element from the page's tab-order, an prevents a name value pair from being submitted with the rest of the form. |
|
#7
|
|||
|
|||
|
How is DISABLED coded?
It doesn't work for me. |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > form --> checkbox!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|