Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Using onChange to submit form

Posted on 2004-09-17
1
Medium Priority
?
213 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
1 Comment
 
LVL 15

Accepted Solution

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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

972 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