from and back button

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I've written a web page in which a <select> element uses the
"onchange" attribute to advance to another page instead of requiring
the user to pick an option from the select menu and then click a
"submit" button.

One problem with this, however, is that if the user clicks their back
button after using the <select> menu, the previously selected value
remains in place.

Re: from and back button

Quoted text here. Click to load it

Set the selectedIndex before you jump.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
" ">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<select onchange="var a=this.options[this.selectedIndex].value;
<option selected="selected">Select</option>
<option value="">Google</option>
<option value=" ">Yahoo</option>
BootNic   Thursday, April 05, 2007 12:10 AM

All things come to him who waits - provided he knows what he is
waiting for.
*Woodrow T. Wilson*

Re: from and back button


Quoted text here. Click to load it

And then you leave users with JavaScript disabled exactly where? Note that
this includes indexing robots.

Quoted text here. Click to load it

The real problem is that you are using an expensive poorly working plastic
imitation of a list of links. Use links, Luke. For a list of reasons, check

Jukka K. Korpela ("Yucca")

Re: from and back button

On Apr 4, 8:26 pm, ""
Quoted text here. Click to load it

# Set the selection back to default before you change the location of


# Set the selection to default on page load.

Site Timeline