M
Martin
I have the following drop-down in one of my pages. Note the use of
document.all in calling the ShowView function. This seems to work OK.
<select id='mySelect' style='font-size:120%; width:150px;'
onchange=ShowView(document.all['mySelect'].options[document.all['mySelect'].selectedIndex].value)>
<option value='PICKLEVEL1'>Pick Level 1</option>
<option value='PICKLEVEL2'>Pick Level 2</option>
<option value='PICKLEVEL3'>Pick Level 3</option>
<option value='CHECKPACK'>Check Pack</option>
<option value='SHIPPING'>Shipping</option>
</select>
But, if I modify it to use document.getElementByID, it generates a
syntax error. I've Googled around a bit and found examples that seem
to indicate that this should work.
onchange=ShowView(document.getElementByID('mySelect').options[document.getElementByID('mySelect').selectedIndex].value)>
Can someone tell me what I'm doing wrong here?
Thanks.
document.all in calling the ShowView function. This seems to work OK.
<select id='mySelect' style='font-size:120%; width:150px;'
onchange=ShowView(document.all['mySelect'].options[document.all['mySelect'].selectedIndex].value)>
<option value='PICKLEVEL1'>Pick Level 1</option>
<option value='PICKLEVEL2'>Pick Level 2</option>
<option value='PICKLEVEL3'>Pick Level 3</option>
<option value='CHECKPACK'>Check Pack</option>
<option value='SHIPPING'>Shipping</option>
</select>
But, if I modify it to use document.getElementByID, it generates a
syntax error. I've Googled around a bit and found examples that seem
to indicate that this should work.
onchange=ShowView(document.getElementByID('mySelect').options[document.getElementByID('mySelect').selectedIndex].value)>
Can someone tell me what I'm doing wrong here?
Thanks.