Solved

Using onChange to submit form

Posted on 2004-09-17
1
211 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
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.
Suggested Courses

624 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