Solved

Using onChange to submit form

Posted on 2004-09-17
1
210 Views
Last Modified: 2010-04-06
Hello,
I know this should be easy but I'm missing something.

I have a form like this:

    <SELECT NAME="team" onChange="submit">
            <OPTION value="Rams">Rams
            <OPTION value="Bears">Bears
            <OPTION value="RumRasin">Colts
            <OPTION value="Packers" selected>Packers
    </SELECT>

This select is actually one of 5 on the page and each select MUST go to the DB to retrieve some data.  So the first SELECT builds the menu for the second SELECT.  Right now I have OK buttons to SUBMIT but I want to change the page so that the form is automatically submitted to the action page when a user makes a selection.

This actually may be all it takes as far as the tag is concerned but what I'm missing is a javascript to go along with the onChange="submit" that I put into the SELECT.

Thanks, Jerry
0
Comment
Question by:geraldw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 15

Accepted Solution

by:
joeposter649 earned 125 total points
ID: 12087423
Are you looking for this?
<SELECT NAME="team" onchange="this.form.submit();">
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question