Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts

    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?

  • #2
    New Coder
    Join Date
    Sep 2007
    Posts
    98
    Thanks
    25
    Thanked 4 Times in 4 Posts
    Try... <select name="name" onChange="this.form.submit()"> ...

  • #3
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts
    <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?

  • #4
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    I need to know what I should put in "this.form.submit()"
    You don't put anything in there, it just submits the form.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • #5
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts
    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.

  • #6
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    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.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • #7
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,299
    Thanks
    57
    Thanked 525 Times in 512 Posts
    Blog Entries
    5
    Quote Originally Posted by CoolKay View Post
    - 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 View Post
    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.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #8
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    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.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •