I have the following function which is triggered by an onchange event.
The param that is sent is the id of a hidden element that I want to set from 0 to 1 so that I know that a change has been made.
Basically I have a form that is created in asp so that each dropdown has it's own hidden change element when the dropdown is changed the script should kick in and set the value of the hidden element WxDxChanged to 1
Sample of the html that is produced by the asp....
The error I'm getting is...
Object Expected and points to the line with the onchange event that was used.
Any help appreciated
I've not failed! Just found 100 ways that don't work...yet!
Code:
function ObjChanged(OC)
{
document.getElementById(OC).value = "1";
}
The param that is sent is the id of a hidden element that I want to set from 0 to 1 so that I know that a change has been made.
Basically I have a form that is created in asp so that each dropdown has it's own hidden change element when the dropdown is changed the script should kick in and set the value of the hidden element WxDxChanged to 1
Sample of the html that is produced by the asp....
Code:
<tr>
<td class="InOutDT">
Tue 15/9
<input type="hidden" name="W1D2ActualD" id="W1D2ActualD" value="15/09/2009" />
<input type="hidden" name="W1D2Changed" id="W1D2Changed" value="0" />
</td>
<td class="InOutAM_L">
<select name='W1D2AMV' id='W1D2AMV' onchange='ObjChanged(W1D2Changed)' >
<option value='IN' selected='selected'>IN</option>
<option value='NA' >Not Available</option>
<option value='OUT' >OUT</option>
</select>
</td>
<td class="InOutAM_L">
<select name='W1D2PMV' id='W1D2PMV' onchange='ObjChanged(W1D2Changed)' >
<option value='IN' selected='selected'>IN</option>
<option value='NA' >Not Available</option>
<option value='OUT' >OUT</option>
</select>
</td>
<td class='InOutNote_L'>
<input type='text' size='95' maxlength='120' name='W1D2NoteV' id='W1D2NoteV' value='' />
<input type='hidden' name='W1D2ResetD' id='W1D2ResetD' value='16/09/2009' />
</td>
</tr>
<tr>
<td class="InOutDT">
Wed 16/9
<input type="hidden" name="W1D3ActualD" id="W1D3ActualD" value="16/09/2009" />
<input type="hidden" name="W1D3Changed" id="W1D3Changed" value="0" />
</td>
<td class="InOutAM_L">
<select name='W1D3AMV' id='W1D3AMV' onchange='ObjChanged(W1D3Changed)' >
<option value='IN' selected='selected'>IN</option>
<option value='NA' >Not Available</option>
<option value='OUT' >OUT</option>
</select>
</td>
<td class="InOutAM_L">
<select name='W1D3PMV' id='W1D3PMV' onchange='ObjChanged(W1D3Changed)' >
<option value='IN' selected='selected'>IN</option>
<option value='NA' >Not Available</option>
<option value='OUT' >OUT</option>
</select>
</td>
<td class='InOutNote_L'>
<input type='text' size='95' maxlength='120' name='W1D3NoteV' id='W1D3NoteV' value='' />
<input type='hidden' name='W1D3ResetD' id='W1D3ResetD' value='17/09/2009' />
</td>
</tr>
The error I'm getting is...
Object Expected and points to the line with the onchange event that was used.
Any help appreciated
I've not failed! Just found 100 ways that don't work...yet!