views:

29

answers:

2

Hi,

While considering another problem one question appeared. I do not know how to write html when I want to redirect page when select option changes. In other words user chooses option from select list and page is redirected after that.

Have you met anything like this?

Regards,

+1  A: 

You can do this easily with an change event handler; see this example using an inline onchange. You didn't say how to construct the destination URL, though.

Matthew Flaschen
+1 for the solution provided by u...
piemesons
A: 

To do something like this, Javascript is required.

You would need to created a onchange function that targets your select dropdown with each select item having a different value, perhaps a url. Or, you can have the url's defined within an array within your function. On getting the url value required, you can you JS to auto-send the link into the url browser, going where you need it to go.

duckbox