javascript - Onchange ,Arrow key up,down works in FF & Chrome but not work in IE -


it jquery code

    <script type="text/javascript" charset="utf-8">  $(document).ready(function() {             $("#tasks").hide();             $("select#categories").change(function(){                     $("#tasks").show();                     $.getjson("ajax.php?module=responsibles&action=list_tasks",{id: $(this).val()}, function(j){                              if($("#categories").val()=="-0")                              {                                                                    $("#tasks").hide();                             }                             //if div hidden                             $("div#form_objectifs").hide();                             var options = '';                             (var = 0; < j.length; i++)                             {                                     options += '<option value="' + j[i].optionvalue + '">' + j[i].optiondisplay + '</option>';                             }                             $("#tasks").html(options);                             $('#tasks option:first').attr('selected', 'selected');                     })             })     }); </script> 

this code works fine on ff or chrome,but not work in ie arrow key up,down

anybody

first problem : there no keyup or keydown event in script. use change event fired when element loose focus.

second problem : use $(document).ready(function() { ... }); , in use $(function(){ ... });. it's 2 different way write same thing (the second alias of first). choose 1 of them not both.

third problem : please, best explain problem can ;).


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -