Re: dynamic drop down

From: Date: Tue, 23 Apr 2002 14:01:46 +0000
Subject: Re: dynamic drop down
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-94161@lists.php.net to get a copy of this message
On Tuesday, April 23, 2002, at 07:01 AM, Kunal Jhunjhunwala wrote:
I am trying to make a drop down list such that, when some one selects an option, it refreshs and displays the option on the same page. There are a couple of things already in the URL [ the query string ], which need to remain there. How would I do this easily?
First, you need to use JavaScript (I think the onchange handler) to automatically submit the form when the user selects an option from the dropdown list. That's no big deal. But to maintain the querystring, you will need to do a bit of finagling -- but it's nothing hard. You could either use $_SERVER['QUERYSTRING'] and place the value of this variable into a hidden form field, or you could do a foreach ($_GET) and concatenate the results into a string and place that into a hidden form field. If you aren't sure what I'm talking about I can write up an example. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com

« previous php.general (#94161) next »