|
-
February 24th, 2003, 06:50 AM
#1
Locking a CheckBox in HTML
Hi all,
I have to lock a Checkbox in HTML, I don't want to disable it since it spoils the look of the site, is there any way to lock it as though we do with a textbox, if so How Can Anyone plz help on this
Regards
Raj
Regards
Raj
-
February 24th, 2003, 07:10 AM
#2
I usually try to control what can happen. Most times I want the item to be able to be set on but no off so I do like so.
Code:
<SCRIPT LANGUAGE=JAVASCRIPT>
var IsClicked = 0;
function SetClick()
{
if (IsClicked)
BOB.checked = true;
else
IsClicked=1;
}
</SCRIPT>
<INPUT TYPE=checkbox NAME=BOB OnClick="SetClick()">Test
This will allow to be set on but trying to click off just sets value on.
Not sure of any other way to do what you ask.
-
February 24th, 2003, 10:53 PM
#3
Thank You
Thanks anyway I will try to build the logic from here
regards
Raj
Regards
Raj
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|