Jump to content


How can I bypass the Submit button

  • Please log in to reply
3 replies to this topic

#1 sjones

  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 06 April 2006 - 06:04 PM

I would like to be able to select form data and send it to the next part of the script without using a submit button. I would like to just click or double click the selection in the menu list and then post that data to the next section of the script is this possible.

#2 wildteen88

  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 06 April 2006 - 06:19 PM

By form data do you provide input boxes for users to input data? Or do have pull down menus that have predefined data and when a user choses an option from the menu you would like it auto submit the form?

#3 sjones

  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 06 April 2006 - 06:29 PM

OK, The data will come from a list menu. this is the code - you can view how it functions now by going to
[a href=\"http://www.countrysavingsmagazine.com/master_coupon.php\" target=\"_blank\"]http://www.countrysavingsmagazine.com/master_coupon.php[/a]
I'm not sure if there has to be something added to the <head> of the page??

<?php include ('connections/mysql_connect.php');
$row_query = mysql_query("SELECT * FROM categories;");
$row_number = mysql_num_rows($row_query); ?>
echo "<form name='form1' method='post' action='master_coupon.php'>
<select name='cat_id' size='".$row_number."' onChange='MM_jumpMenu('parent',this,0)'>";
$qry = mysql_query("SELECT * FROM categories;");
while($rows = mysql_fetch_assoc($qry)) {
echo "<option value='".$rows['cat_id']."'>".$rows['cat_name']."</option>\n";
<input name='submit' type='submit' value='Select Category'>

#4 Malkavbug

  • Members
  • PipPip
  • Member
  • 17 posts

Posted 06 April 2006 - 07:51 PM

this is from one of my pages

The Drop Down Box

<td align="right" valign="bottom" class="jumpto">
<select style="font-size:9;" name="choice" onChange="jump(this.form)">

<option>Go to...</option>
<option value="private.php">Private Messages</option>
<option value="private.php?do=send">Send PM</option>

Header javascript

<script LANGUAGE="JavaScript" type="text/javascript">
function jump(menu)
if (splitc!=-1)
else {loc=ref; target="_self";};
if (ref != "") {land(loc,target);}

Now, this will allow you to enable a navigation based on it, and if you use $_GET in urls as the variables then you can just have things print to the URL, like I have in the above example "private.php?do=send"

That maybe what you were going for? If you had subcategories you could chain this system together to lower sub levels.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users