i have the following, a simpified version of the actual code,
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "
http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled</title>
<script>
function getvalues(obj){
alert([obj.name, obj.options.selectedIndex,
obj.options.defaultSelecte
d]);
obj.options.defaultSelecte
d=obj.opti
ons.select
edIndex;
}
</script>
</head>
<body>
<form name="frm">
<select name="sel" onchange="getvalues(this);
">
<option>Sel</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5" selected="selected">5</opt
ion>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
<input type="reset" value="r">
</form>
</body>
</html>
teh first time i make a selection teh third value is blank, despite there being a selected value in the dropdown, however on subsequent changes teh third value holds the previously selected item.
i need to be able to determine teh value every time, particularly the FIRST time (need to have) the onchange event occurs and to overwrite the defaultSelected(nice to have) so that a reset will go to the last item selected not the item marked as selected on page load