Page 1 of 1

form action

Posted: Wed Jun 21, 2006 11:45 am
by alexislalas
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?

Posted: Wed Jun 21, 2006 11:47 am
by feyd
something like.... what?

Posted: Wed Jun 21, 2006 11:50 am
by alexislalas
feyd wrote:something like.... what?

sorry, i clicked the wrong button...

Posted: Wed Jun 21, 2006 12:02 pm
by feyd
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>.