Ronnieinspain
01-15-2012, 03:34 PM
Hi All,
Need a bit of help here, need this SELECT to submit the page and end up at the below URL, correctly passing the GET values through the string.
<code>
<select name="dir-fact-misma" id="dir-fact-misma" class="text100" tabindex="" onChange="alta_nueva.action='alta.php?page=p2#alta'; return true;">
<option value="Si" <?php if(!isset($_POST['dir-fact-misma']) || $_POST['dir-fact-misma'] == 'Si') print "Selected='Selected '"; ?>>Si</option>
<option value="No" <?php if(isset($_POST['dir-fact-misma']) && $_POST['dir-fact-misma'] == 'No') print "Selected='Selected '"; ?>>No</option>
</select>
</code>
the form in which this SELECT is placed needs to be submitted so that other fields in the form are not lost, they are saved in Session Variables.
the same javascript but activated through an onclick event works perfect elsewhere in the same form with the following code, i think its the onChange that doesn't work for some reason.
<code>
<input name="p1" type='submit' id="p1" onclick="alta_nueva.action='alta.php?page=p1#alta'; return true;" value='1' />
</code>
the page is programmed in PHP.
Any help is appreciated.
Need a bit of help here, need this SELECT to submit the page and end up at the below URL, correctly passing the GET values through the string.
<code>
<select name="dir-fact-misma" id="dir-fact-misma" class="text100" tabindex="" onChange="alta_nueva.action='alta.php?page=p2#alta'; return true;">
<option value="Si" <?php if(!isset($_POST['dir-fact-misma']) || $_POST['dir-fact-misma'] == 'Si') print "Selected='Selected '"; ?>>Si</option>
<option value="No" <?php if(isset($_POST['dir-fact-misma']) && $_POST['dir-fact-misma'] == 'No') print "Selected='Selected '"; ?>>No</option>
</select>
</code>
the form in which this SELECT is placed needs to be submitted so that other fields in the form are not lost, they are saved in Session Variables.
the same javascript but activated through an onclick event works perfect elsewhere in the same form with the following code, i think its the onChange that doesn't work for some reason.
<code>
<input name="p1" type='submit' id="p1" onclick="alta_nueva.action='alta.php?page=p1#alta'; return true;" value='1' />
</code>
the page is programmed in PHP.
Any help is appreciated.