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 8185007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:41:50+00:00 2026-06-07T01:41:50+00:00

I have the code with jquery like this and it works but there is

  • 0

I have the code with jquery like this and it works but there is a problem with arrow key press.

 $(document).ready(function() {   
  $(function(){
     $("#tasks").hide();
        $("select#categories").livequery("change", function () {
                $("#tasks").show();
                $.getJSON("ajax.php?module=responsables&action=list_tasks",{id: $(this).val()}, function(j){

                        if($("#categories").val()=="-0") 
                        {                               
                                $("#tasks").hide();
                        }
                        //if the div is hidden
                        $("div#form_objectifs").hide();
                        var options = '';
                        for (var i = 0; i < j.length; i++)
                        {
                                options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>';
                        }
                        $("#tasks").html(options);
                        $('#tasks option:first').attr('selected', 'selected');
                })
        }).livequery("keypress", function() { 
              $(this).trigger("change");    
            });

 });
</script>

I have try to with this : http://jsfiddle.net/tW6Su/2/ that give possibility to arrow key press filter.

So I tried:

<script type="text/javascript" charset="utf-8">
 $(document).ready(function() {   
    $(function(){
         $("#tasks").hide();
            $("select#categories").livequery("change", function () {
                    $("#tasks").show();
                    $.getJSON("ajax.php?module=responsibles&action=list_tasks",{id: $(this).val()}, function(j){

                            if($("#categories").val()=="-0") 
                            {                               
                                    $("#tasks").hide();
                            }
                            //if the div is hidden
                            $("div#form_objectifs").hide();
                            var options = '';
                            for (var i = 0; i < j.length; i++)
                            {
                                    options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>';
                            }
                            $("#tasks").html(options);
                            $('#tasks option:first').attr('selected', 'selected');
                    })
            }).livequery("keypress", function() { 
           $(this).trigger("change");


 });
</script>

But I got a js error.

$("select#categories").livequery is not a function http://localhost/project/index.php?module=responsibles&action=objectivs Line 120

Anyone Could help me what am wrong ? thanks

  • 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-07T01:41:54+00:00Added an answer on June 7, 2026 at 1:41 am

    It seems the jsFiddle isn’t including the script when running. When I include it in the HTML it works as expected.

    http://jsfiddle.net/tW6Su/11/

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

Sidebar

Related Questions

I have my jQuery code like this $(document).ready(function () { var lastsel; $('#jqgProducts').jqGrid({ //url
I have some jQuery code like this : $(function($) { $('input.autonumeric').autoNumeric({aSep: ',', aDec: '.',vMax:'1000000000000'});
I have jQuery code which looks something like this on Button1 Click $('table.result_grid tbody
I have the following JavaScript code which I like to convert to jQuery but
Ok, I have this code: <html> <head> <script type=text/javascript src=http://code.jquery.com/jquery-1.7.1.min.js></script> <script type=text/javascript> function get()
I have this small problem with jquery: I need to do something like this:
I have this code: jQuery: var mouseDown=false; var lastPositionX; var lastPositionY; var newX; var
OK i have this code HTML: <html> <head> <script type=text/javascript src=http://code.jquery.com/jquery-1.7.1.min.js> </script> <script type=text/javascript>
Like allways, in Firefox, Chrome, Safari and Opera everything works without a problem. But
I am having an odd problem with jQuery 1.5.2 in Chrome. I have code

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.