T
The Natural Philosopher
This is a nasty one and I can't see my way out of it.
I have a bunch of select statements in a form, and each select statement
has an onchange="do_something(this)" in it, and this works
nicely..except when there is only ONE OPTION in a given select.
It seems you cannot 'onchange' a single option!
Well, that is reasonable.
The trouble is I have no way of selecting it since the form itself is a
dummy: The form action is basically to submit to a new script with
hidden variables carefully set to get the desired action depending on
the last option selected..
onclick() in the <option> itself doesn't work for IE6...
Can anyone think of a way to achieve what I want?
The fragment in question is this one
<TR><TD align="center"><b>Julian's Projects</b></td>
<TD align="center"><select STYLE="width: 200px" name="project_id"
onchange="select_project_id(this)">
<OPTION value= "13" >ME-262 (Sep 13th 07)</OPTION>
</select></TD></TR>
This works stunningly with more than one option..but falls apart with
just one.
The option of making the single option SELECTED is a non starter, as
there are other options in other select statements that deselect this
one..once deselected I can't ever get it back!
I think I tried an onclick() on the whole select thing, but it didn't
work too well.
I have a bunch of select statements in a form, and each select statement
has an onchange="do_something(this)" in it, and this works
nicely..except when there is only ONE OPTION in a given select.
It seems you cannot 'onchange' a single option!
Well, that is reasonable.
The trouble is I have no way of selecting it since the form itself is a
dummy: The form action is basically to submit to a new script with
hidden variables carefully set to get the desired action depending on
the last option selected..
onclick() in the <option> itself doesn't work for IE6...
Can anyone think of a way to achieve what I want?
The fragment in question is this one
<TR><TD align="center"><b>Julian's Projects</b></td>
<TD align="center"><select STYLE="width: 200px" name="project_id"
onchange="select_project_id(this)">
<OPTION value= "13" >ME-262 (Sep 13th 07)</OPTION>
</select></TD></TR>
This works stunningly with more than one option..but falls apart with
just one.
The option of making the single option SELECTED is a non starter, as
there are other options in other select statements that deselect this
one..once deselected I can't ever get it back!
I think I tried an onclick() on the whole select thing, but it didn't
work too well.