trunkrecords
Programmer
Hello all,
I am writing an application which dynamically generates forms based upon info contained within a MySql db. The problem that I am having is this:
I have 2 loops to write a checkbox and a textbox for a particular type of question. Part of the form behaves normally and part does not. Here is the code which operates correctly -
This code does not fire correctly -
Does anyone see the problem? To me the code looks exactly the same except for the names.
I am writing an application which dynamically generates forms based upon info contained within a MySql db. The problem that I am having is this:
I have 2 loops to write a checkbox and a textbox for a particular type of question. Part of the form behaves normally and part does not. Here is the code which operates correctly -
Code:
<input name='c1414' type='checkbox' value='Discharge diagnosis (choose as many as apply from the list below)'
onclick="javascript:if (this.checked){ document.questionqueryform.txt1414_1.disabled=false; }"
onmouseup="javascript:if (this.checked){ document.questionqueryform.txt1414_1.disabled=true; }" />
Other, Specify
<input name='txt1414_1' type='text' value='' id='txt1414_1' class='' disabled=true />
This code does not fire correctly -
Code:
<input name='c1417' type='checkbox' value='Limb reduction defects'
onclick="javascript:if (this.checked){ document.questionqueryform.txt1417_1.disabled=false; }"
onmouseup="javascript:if (this.checked){ document.questionqueryform.txt1417_1.disabled=true; }" />
Limb reduction defects
<input name='txt1417_1' type='text' value='' id='txt1417_1' disabled=true />
Does anyone see the problem? To me the code looks exactly the same except for the names.