troubleshooting Question

jquery change event not firing

Avatar of peter_coop
peter_coopFlag for United Kingdom of Great Britain and Northern Ireland asked on
Web Languages and StandardsJavaScriptjQuery
12 Comments2 Solutions418 ViewsLast Modified:
I am using a jQuery change event that is working fine apart from an addition I just made. What I am trying to do, is when a user selects anything other than 'NEW' from the select, then show an input element.

I assumed that this would work with just an else statement, but I was wrong. I would be grateful if someone could check my code and show me where I am going wrong?

I only posted code that was relevant, as all the other code is working apart from this else statement.
Thanks
<!--- dropdown for new user addition  -->
<script language="javascript" type="text/javascript">


        $(function() {

        $("#fld_company").show();
        $("#data").hide();


        $("#fld_company").live('click', function() {
              $("#fld_fld").toggle(1000);
              $("#formMessage").toggle(1000);
        });

            $("#AUSR_company").live('change', function() {
              if($(this).val()=="new")

             {
                $("#data").slideDown(1000);

             }

        else

           {

            $("#AUSR_name").show().slideDown(1000);

           }
        });
    });
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 12 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros