File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Make Checkbox group Non-Editable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Make Checkbox group Non-Editable" Watch "Make Checkbox group Non-Editable" New topic
Author

Make Checkbox group Non-Editable

Sanjay pts
Ranch Hand

Joined: Nov 07, 2000
Posts: 357
Hello
Can anybody told me how to make checkbox group non-editable.
I have a view option in my project so i don't want user to modify that checkbox group which i had already selected.
I had tried out with this "readonly=true" and "onfocus=blur()",but it will not work out.
Thanx
sanjay patel

Eat JAVA, Drink JAVA, Sleep Java
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
This is really a HTML question, so I've moved it.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
The onblur() will work with text boxes, but not radio buttons or check boxes. I believe that this is because to make the radio button get focus, you click on it, and when you click on a radio button, it changes that value. So it is the order of events on the radio buttons and checkboxes that is screwing that up. Works nice on text fields though.
There is not an inactive flag for radio buttons or check boxes, so you really can't do this. My suggestion would be to create an image of a checkbox, one checked, and one not checked, and then have some server side processing that displays the correct image from the form that was submitted. You can then put all the real values in hidden fields, so you can submit them form from that page also. You don't have to use images either, and just use straight HTML text to say what is checked, but the images might give it a nice look.
Bill
[This message has been edited by bill bozeman (edited November 27, 2000).]
David Rizzi
Greenhorn

Joined: Nov 24, 2000
Posts: 10
Might try something like this:
<form action="whatever" method="post">
<input name="cb1" type="checkbox" onclick="forms(0).cb1.checked=defaultChecked">
</form>
-David
Originally posted by Sanjay pts:
Hello
Can anybody told me how to make checkbox group non-editable.
I have a view option in my project so i don't want user to modify that checkbox group which i had already selected.
I had tried out with this "readonly=true" and "onfocus=blur()",but it will not work out.
Thanx
sanjay patel

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Make Checkbox group Non-Editable