PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
alexislalas
Forum Commoner
Posts: 44 Joined: Sun Feb 19, 2006 10:09 pm
Post
by alexislalas » Wed Jun 21, 2006 11:45 am
hello
i have a form with 3 menu/lists. i want the last menu/list to be the one that determines the action. something like:
Code: Select all
<select name="formato" class="textfield" id="formato">
<option>Selecciona uno:</option>
<option value="F600_alta.php">F600</option>
<option value="F601_alta.php">F601</option>
<option value="F602_alta.php">F602</option>
<option value="F603_alta.php">F603</option>
is it possible to determine the action in the form from the option they select?
Last edited by
alexislalas on Wed Jun 21, 2006 11:48 am, edited 1 time in total.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Jun 21, 2006 11:47 am
something like.... what?
alexislalas
Forum Commoner
Posts: 44 Joined: Sun Feb 19, 2006 10:09 pm
Post
by alexislalas » Wed Jun 21, 2006 11:50 am
feyd wrote: something like.... what?
sorry, i clicked the wrong button...
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Jun 21, 2006 12:02 pm
I don't recommend it as having Javascript disabled will make it not work but...
You can use Javascript to alter the action of a form using the onchange event hook of the <select>.