Skip to content
Advertisement

Select box Onchange: autosubmit() option with php

So it’s like I have a selectbox, with while loop as option as I want to bring out the options from database, is it possible to click on the option and link?

The while loop is like this

JavaScript

This is the select box

JavaScript

But on clicking the option I want to link it to

JavaScript

How can I do this?

Advertisement

Answer

Use Javascript to call the onchange.

Between the header tags, put:

JavaScript

View the working jsbin: http://jsbin.com/uwuyoz/1/

Please note, you’ll have to uncomment the window.location. I simply have it ‘alerting’ now. But all the code is there.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement