CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   PHP (http://www.codingforums.com/forumdisplay.php?f=6)
-   -   do away with the submit button? (http://www.codingforums.com/showthread.php?t=285300)

CoolKay 01-05-2013 03:37 AM

do away with the submit button?
 
My php guy cannot figure out how to do away with the submit box - um, like if I had a drop down menu and a visitor clicked on a entry of it - I would like it to go immediately to a different php inset selection on the page - (to load it in the center of the page vertically down.... like a events list - in otherwords to replace just the center of the page php code) WITHOUT using a submit button. Can someone tell us where to go to get info on how to do this? is this a php or a html funtion?

weir-07 01-05-2013 04:00 AM

Try... <select name="name" onChange="this.form.submit()"> ...

CoolKay 01-06-2013 10:21 PM

<select name="name" onChange="this.form.submit()">
This is apparently the first line of a html dropbox yes?
I need to know what I should put in "this.form.submit()"

Can you direct me to a html refeence that would tell me?

AndrewGSW 01-06-2013 10:28 PM

Quote:

I need to know what I should put in "this.form.submit()"
You don't put anything in there, it just submits the form.

CoolKay 01-07-2013 12:02 AM

Hi, Andrew and thanks for the reply
We are having a issue.
I want to have a drop down list of type of events on countyfairgrounds.net
- when the user clicks a type of event in this drop down box - it would automatically pull the type of that event - say home and garden shows - from our MySQL databse WITHOUT hitting a submit button.... and we cannot figure out how to submit a form without the button - that is the issue. I am doing some Yahoo browser searches but no results so far.

AndrewGSW 01-07-2013 12:27 AM

As far as I can see your question has already been answered:

Code:

<select name="name" onchange="this.form.submit()">
When somebody chooses an option from the select list, this will immediately submit the form (that the select is contained within).

This, of course, is assuming that the select is contained within a form, which has a method and an action, and that you have a page that processes the submitted data.

tangoforce 01-07-2013 02:02 AM

Quote:

Originally Posted by CoolKay (Post 1304498)
- when the user clicks a type of event in this drop down box - it would automatically pull the type of that event - say home and garden shows - from our MySQL databse WITHOUT hitting a submit button

Quote:

Originally Posted by AndrewGSW (Post 1304499)
Code:

<select name="name" onchange="this.form.submit()">

I think what the op is looking for Andrew is an ajax request that sends off the selected item and then returns a list of events for it which are then displayed in the page without the page actually submitting.

They've not worded it very well though.

AndrewGSW 01-07-2013 06:04 AM

Quote:

I think what the op is looking for Andrew is an ajax request that sends off the selected item and then returns a list of events for it which are then displayed in the page without the page actually submitting.

They've not worded it very well though.
That had occurred to me as well, but the OP stressed "without clicking a submit button" so I assumed that he already had the form-submission set up.


All times are GMT +1. The time now is 06:58 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.