Solved

Submit Form w/JS Function onChange of option

Posted on 2004-04-21
2
525 Views
Last Modified: 2008-03-10
I have a form that has a drop down selection.  Upon change of value in the drop down - I need to know how to submit the form automatically using a JavaScript function; I presume that this is what I would need to do.  If someone has a way to do this please help.
0
Comment
Question by:kbsitz
2 Comments
 
LVL 7

Accepted Solution

by:
cstsang earned 75 total points
ID: 10884824
try this one:
<form name="form1">
<select onchange="go()">
.........
</select>
</form>

<script language=javascript>
  function go()
    {
      document.form1.submit();
     }
</script>
0
 

Author Comment

by:kbsitz
ID: 10890788
Thanks.  Probably simple - but I had a typo and couldn't get mine to work - thanx again.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.net Show "please wait " message as page loads 2 46
Jquery 10 20
Client Validating 2 date fields, required & comparison 1 30
Javascript Form Change 5 23
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

825 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