View Full Version : Dropdown without Go Button

02-21-2003, 11:51 AM
I would prefer to use PHP over Javascript but I don't know if what I want to do is possible with PHP or how to do it if it is, what I want is a dropdown and when you select an option from it, you are automatically taken to another page (no button to click) is that possible without JS?

02-21-2003, 12:31 PM
no i dont think it ispossible with out javascript. But by using javascript your object has been solved , onchange event of select , is used in that case. If u get the way without useingjavascript then plz let me know.

02-21-2003, 03:07 PM
anurag_shr is right. PHP is a server-side language, what you're describing is a client-side behaviour. Once the page is loaded in your browser, forget PHP. It's simple enough to do with JS using the onChange method as mentioned.


02-21-2003, 03:20 PM
This belongs in the Javascript forum....

Ding Ding...

02-21-2003, 03:50 PM
An example is on this very page:

<select name="forumid"
<option value="-1" >Please select one:</option>
<option value="-1">--------------------</option>
<option value="pm" >Private Messages</option>
<option value="cp" >User Control Panel</option>
<!-- and so on -->

02-23-2003, 07:15 AM
still not actually using PHP, just refering to the page ...

02-23-2003, 08:16 PM
Its still in the PHP Forum

Ding Ding...

02-23-2003, 08:17 PM
Well there is still a link to it in the PHP Forum

Dong Dong

02-24-2003, 12:24 AM
Well of course it's still linked in the PHP forum

Ding Dong


02-24-2003, 03:33 AM
Jesh, what i meant was the code supplied above wasnt PHP.
If that's even what you were talking about.