Re: drop down used to redirect?

From: Date: Mon, 26 Mar 2001 07:11:02 +0000
Subject: Re: drop down used to redirect?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-45565@lists.php.net to get a copy of this message
You can do it with javascript like this. <script language="javascript"> function go(selectBox) { var where = selectBox.options[selectBox.selectedIndex].value; if (where != "") window.location = where; } </script> <form> <select onchange="go(this)"> <option value="page.html">Page</option> ... Or you can use PHP like this. <form action="nav.php" method="post"> <select name="loc"> <option value="page.html">page</option> ... --- nav.php --- <?php header("Location:$loc"); ?> ----- Original Message ----- From: duirfire <duirfire@virtweb.ne.mediaone.net> To: PHP User Group <php-general@lists.php.net> Sent: Sunday, March 25, 2001 2:39 PM Subject: [PHP] drop down used to redirect? > > Hi, can anyone point me towards an example of how to use a drop down select > as a navigation jump, maybe by sending a redirect header? > > thanks! > duirfire > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#45565) next »