html - Execute JavaScript when Select Element Has Only 1 Option -
i have select
element in html form. options of element populated dynamically. when there more 1 option have javascript execute when user selects option like.
however, when select
element has 1 option have javascript submit automatically. tried setting option selected
, adding onselect
. don't think onload
work either.
this html when there 1 option:
<select name="acctnumber_box" id="acctnumber_box" onselect="filldistributoracctnumber (value)"> <option selected="selected"><%=customernumber %> <%= customername %></option> </select>
does have solution this?
Comments
Post a Comment