Checkboxs
Jul 23, 2005
I have a form with a textbox...
<input type="text" name="textbox1" value="value1" disabled>
Obviously that produces a textbox that the user cannot edit.
What I want is when the user puts a tick in a checkbox next to the textbox
for the textbox to become active.
I know it's possible, but how?!
View 7 Replies
Jul 23, 2005
I have a snippet of code below that creates a new input element for a
checkbox and sets some attributes.
var observationCheckbox = document.createElement('input');
observationCheckbox.setAttribute('type', 'checkbox');
observationCheckbox.setAttribute('id', 'observation.' + runningCount +
'.species');
observationCheckbox.setAttribute('name', 'observation.' + runningCount +
'.species');
observationCheckbox.setAttribute('value', 's' + speciesCode);
Question: Is it possible to set this checkbox to be 'checked' when it is
created? I'm not sure if this constitutes an attribute or not.
View 2 Replies
View Related