Note that there are some explanatory texts on larger screens.

plurals
  1. POdocument.getElementById (still) not working
    text
    copied!<p>I started a thread here <a href="https://stackoverflow.com/questions/1266470/document-getelementbyid-not-working">document.getElementById not working</a> but it looks as though even the suggestions made were valid I still have a problem.</p> <p>I have a couple of checkboxes. When i view the page source here there are. document.getElementById('chk1') is the only one that is not null. How could that be?</p> <pre><code>&lt;input id="chk0" value="JobStages###StageCode~JobCode###DRAW~1005" onclick="addRemoveRow(this.value,this.checked)" style="border-width:0px;padding:1px;margin:0px;height:14px;" type="checkbox" /&gt; &lt;input id="chk1" value="JobStages###StageCode~JobCode###FEAS~1005" onclick="addRemoveRow(this.value,this.checked)" style="border-width:0px;padding:1px;margin:0px;height:14px;" type="checkbox" /&gt; &lt;input id="chk2" value="JobStages###StageCode~JobCode###N/C~1005" onclick="addRemoveRow(this.value,this.checked)" style="border-width:0px;padding:1px;margin:0px;height:14px;" type="checkbox" /&gt; </code></pre> <p>EDIT: Pretty much the complete code</p> <pre><code>&lt;tr id='rw1' onMouseOver='setHover(this,event);' class='DRAW~1005 ' onClick='setClick(this,event);'&gt; &lt;td id='RowId_0' width=0 style='display: none'&gt;1&lt;/td&gt; &lt;td id='PrimaryKey_0' width=0 style='display: none'&gt;DRAW~1005&lt;/td&gt; &lt;td id='StageCode_0' width=0 style='display: none'&gt;DRAW&lt;/td&gt; &lt;td id='Allocated_0' nowrap style='overflow: hidden; height: 16px; width: 136px; overflow: hidden; text-align: center; padding-left: 5px;' class='col1'&gt;&lt;input id="chk0" value="JobStages###StageCode~JobCode###DRAW~1005" onclick="addRemoveRow(this.value,this.checked)" style="border-width: 0px; padding: 1px; margin: 0px; height: 14px;" type="checkbox" /&gt;&lt;/td&gt; &lt;td id='StageCode_0' nowrap style='overflow: hidden; height: 16px; width: 136px; overflow: hidden; text-align: left; padding-left: 5px;' class='col2'&gt;&lt;/td&gt; &lt;td id='StageDescription_0' nowrap style='overflow: hidden; height: 16px; width: 123px; overflow: hidden; text-align: left; padding-left: 5px;' class='col3' onclick="showTextEditor(event,'JobStages','StageDescription','StageCode~JobCode','DRAW~1005 ');"&gt; &lt;/td&gt; &lt;td id='StartDate_0' nowrap style='overflow: hidden; height: 16px; width: 171px; overflow: hidden; text-align: left; padding-left: 5px;' class='col4' onclick="showCalendar(event,'JobStages','StartDate','StageCode~JobCode','DRAW~1005 ');"&gt; &lt;/td&gt; &lt;td id='EndDate_0' nowrap style='overflow: hidden; height: 16px; width: 112px; overflow: hidden; text-align: left; padding-left: 5px;' class='col5' onclick="showCalendar(event,'JobStages','EndDate','StageCode~JobCode','DRAW~1005 ');"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr id='rw2' onMouseOver='setHover(this,event);' class='FEAS~1005 ' onClick='setClick(this,event);'&gt; &lt;td id='RowId_1' width=0 style='display: none'&gt;2&lt;/td&gt; &lt;td id='PrimaryKey_1' width=0 style='display: none'&gt;FEAS~1005&lt;/td&gt; &lt;td id='StageCode_1' width=0 style='display: none'&gt;FEAS&lt;/td&gt; &lt;td id='Allocated_1' nowrap style='overflow: hidden; height: 16px; width: 136px; overflow: hidden; text-align: center; padding-left: 5px;' class='col1'&gt;&lt;input id="chk1" value="JobStages###StageCode~JobCode###FEAS~1005" onclick="addRemoveRow(this.value,this.checked)" style="border-width: 0px; padding: 1px; margin: 0px; height: 14px;" type="checkbox" /&gt;&lt;/td&gt; &lt;td id='StageCode_1' nowrap style='overflow: hidden; height: 16px; width: 136px; overflow: hidden; text-align: left; padding-left: 5px;' class='col2'&gt;&lt;/td&gt; &lt;td id='StageDescription_1' nowrap style='overflow: hidden; height: 16px; width: 123px; overflow: hidden; text-align: left; padding-left: 5px;' class='col3' onclick="showTextEditor(event,'JobStages','StageDescription','StageCode~JobCode','FEAS~1005 ');"&gt; &lt;/td&gt; &lt;td id='StartDate_1' nowrap style='overflow: hidden; height: 16px; width: 171px; overflow: hidden; text-align: left; padding-left: 5px;' class='col4' onclick="showCalendar(event,'JobStages','StartDate','StageCode~JobCode','FEAS~1005 ');"&gt; &lt;/td&gt; &lt;td id='EndDate_1' nowrap style='overflow: hidden; height: 16px; width: 112px; overflow: hidden; text-align: left; padding-left: 5px;' class='col5' onclick="showCalendar(event,'JobStages','EndDate','StageCode~JobCode','FEAS~1005 ');"&gt; &lt;/td&gt; &lt;/tr&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload