Hi everyone

Everytime I try to use a keyup/keypress/keydown event in my code, I
get a warning in my Firebug whenever it is fired:

>> The 'charCode' property of a keydown event should not be used. The value is 
>> meaningless.

I'm not quite sure what this means, but I'm guessing it's because I
have not set the value of a particular key - however, this is not
required for my function which basically just makes a button appear
when the user puts text in an input field.

My function:

$(function() {
        $("#myinput").keyup(function() {
                var theval = $("#myinput").val();
                var mybutton = $("#thebutton");
                        if(theval!=""){
                                mybutton.fadeIn(200);
                        }else{
                                mybutton.fadeOut(200);
                        }
        });
});

Which seems to actually word - except I get the warning above. Does
anyone know how to avoid this happening?

Thanks,
Mike

Reply via email to