[How to make] Check box Non Editable/Non Selectable? without

  • basketmen
  • Student
  • Student
  • basketmen
  • Posts: 68

Post 3+ Months Ago

I want to make the check box checked, and Non Editable/Non Selectable



Step 1. checked the check box only
from this tutorial page hscripts dot com/tutorials/html/form-checkbox.php its working checked by add entry "checked" in bold below, and the form working with the check box checked after click submit button :

Quote:
<input type="checkbox" checked name="postpoll" value="yes" id="cb_postpoll" tabindex="1" $checked[postpoll] />






Step 2. make it Non Editable/Non Selectable, so the check box are already checked and cannot unchecked by users

from that same tutorial page its says to add entry "disabled" like below in bold

Quote:
<input type="checkbox" checked disabled name="postpoll" value="yes" id="cb_postpoll" tabindex="1" $checked[postpoll] />


its working the check box being Non Editable/Non Selectable, but after click submit button the form are not working maybe because the check box really disabled, its just pass the checked check box, like there is no check box. Maybe using entry "disabled" is the wrong way






please help guys, how to make the form still working after click submit button, but the check box are already checked and cannot unchecked by users
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

Some browsers do not pass along the status of disabled form elements. Technically, you should be able to test the status of various other form elements and determine what the value of the disabled items should be.

For instance, if the checkbox is always checked and only there for display purposes, your program shouldn't need to see the value of the disabled form element, the application should always proceed as if that box were checked since it is.

However, if your disabled status is coming from other events in the page, for instance if selecting a specific option from a <select> element requires that checkbox to be checked, but it could be unchecked with a different option being selected, then you would likely want to set the status of the checkbox manually at the server within a branch of code lead into by the status of your <select> element's value.
  • Satwant
  • Graduate
  • Graduate
  • User avatar
  • Posts: 127
  • Loc: Bangalore

Post 3+ Months Ago

i think JavaScript
Code: [ Select ]
document.getElementById('el_id').style.disabled

return True or False response

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 61 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.