Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9185777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:21:35+00:00 2026-06-17T19:21:35+00:00

This piece of jquery code is suppose to execute a form submit on a

  • 0

This piece of jquery code is suppose to execute a form submit on a drop down select. It works on our test site.
But as soon as we publish it to our live website, it breaks. Can anyone see if there is anything wrong with it?

(ASP / Execute code below)
PAGE: http://www.casa.gov.au/scripts/nc.dll?WCMS:PWA::pc=PC_91330

THE ASP CODE:

<script>
    $(document).ready(function() {

              $(document).on("change","select#state",function(e){
                             $("form").submit();
                               });

     });
</script>

  <form action="avsafety.asp" method="get">



     <p>State:<br/>
      <select id="state" name="state">
        <option label="ACT" value="ACT" <%if request.querystring("state") = "ACT" then response.write("selected") %>>ACT</option>
        <option label="NSW" value="NSW" <%if request.querystring("state") = "NSW" then response.write("selected") %>>NSW</option>
        <option label="NT" value="NT"   <%if request.querystring("state") = "NT" then response.write("selected") %>>NT</option>
        <option label="QLD" value="QLD" <%if request.querystring("state") = "QLD" then response.write("selected") %>>QLD</option>
        <option label="VIC" value="VIC" <%if request.querystring("state") = "VIC" then response.write("selected") %>>VIC</option>
        <option label="SA" value="SA"   <%if request.querystring("state") = "SA" then response.write("selected") %>>SA</option>
        <option label="TAS" value="TAS" <%if request.querystring("state") = "TAS" then response.write("selected") %>>TAS</option>
        <option label="WA" value="WA"   <%if request.querystring("state") = "WA" then response.write("selected") %>>WA</option>
      </select>
      <input type="submit" value="Search" />
    </p>

  </form>

THE CODE ON THE LIVE WEBSITE:

<script type="text/javascript">
    $(document).ready(function() {

              $(document).on("change","select#state",function(e){
                             $("form").submit();
                               });

     });
</script>
<form action="avsafety.asp" method="get">
        <p>
                State:<br />
                <select id="state" name="state">
                        <option label="ACT" value="ACT">
                                ACT
                        </option>
                        <option label="NSW" value="NSW">
                                NSW
                        </option>
                        <option label="NT" value="NT">
                                NT
                        </option>
                        <option label="QLD" value="QLD">
                                QLD
                        </option>
                        <option label="VIC" value="VIC">
                                VIC
                        </option>
                        <option label="SA" value="SA">
                                SA
                        </option>
                        <option label="TAS" value="TAS">
                                TAS
                        </option>
                        <option label="WA" value="WA">
                                WA
                        </option>
                </select> <input type="submit" value="Search" />
        </p><input type="hidden" name="session" value="1918276309" />
</form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:21:37+00:00Added an answer on June 17, 2026 at 7:21 pm

    You’re using an ancient version of jQuery, 1.2.6 which doesn’t have .on(), you’ll need to upgrade to version 1.7+ to use it. Also you might want to be more specific in the form you’re submitting(like give it an id) since there are more than one on the page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this little piece of jQuery/jqModal code which works fine. However, I am
I have this piece of code that works fine in the webpage: <script src=http://code.jquery.com/jquery-1.7.1.min.js></script>
This piece of jQuery code posts to one of our php pages. var json
I've got this piece of code in my jquery validation script: resetForm: function() {
So I have a piece of code: jQuery.fn.center = function(parent) { parent = this.parent();
I came across a piece of code which looks like this: jQuery(function($) { $('#saySomething').click(function()
I have this piece of jQuery code : $('a.manage-content-link').click(function (e) { var self =
I have an application that executes this piece of code (JQuery 1.4.2) in an
I have this piece of jquery code. The idea is to when clicking on
I have this simple piece of code in jQuery $(document).ready(function() { $('#switcher').click(function(event) { if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.