Akshen Posted August 26, 2009 Share Posted August 26, 2009 The input below works perfectly when inside the form I wish to submit, but I'd like to place it outside the <form> tags and use it to submit based on id/class to the seperate pages. Obviously the onChange needs to look something like "onChange=submit MyForm to location of value", how I do that in JS is the question. If anyone could shed some light on the issue, it'd be much appreciated! <?php echo "<select size=\"1\" onChange=\"this.form.action=this.options[this.selectedIndex].value;\"> <option>Submit to...</option> <option value=\"index.php?q=". $_SESSION['nav_sid'] ."&page=1\">Page1</option> <option value=\"index.php?q=". $_SESSION['nav_sid'] ."&page=2\">Page2</option> <option value=\"index.php?q=". $_SESSION['nav_sid'] ."&page=3\">Page3</option> </select> <form id=\"MyForm\"> <input type=\"text\" name=\"blah\" /> </form>"; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.