On 2005-11-20, Monty <mo****@hotmail.com> wrote:
I use a SELECT dropdown as the nav interface for jumping to a chosen
page number. When I setup up the SELECT element on the page, I want to
show the user the current page number they are on, so, I put "selected"
next to the page number, as shown below:
-------------------------------
<form name="pick" method="post" action="showit.php">
<select name="pggo"
onChange="this.options[this.selectedIndex].selected;document.pick.submit();">
<option value="1">1</option>
<option value="2" selected>2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
</form>
-------------------------------
The problem is that no matter what page number is chosen from the
dropdown, the passed value is always "2", because that's the "selected"
value above.
Add onchange to each of the options?
aboce you say:
this.options[this.selectedIndex].selected
this part does nothing, what is it supposed to do?
Bye.
Jasen