0

I'm using this demo:

http://closure-library.googlecode.com/git/closure/goog/demos/combobox.html

But I don't need user input, I've tried to disable it by this:

combobox.getInputElement().disabled = "disabled";

But it won't work in IE6/IE7 (Didn't try IE8/9), that means, in IE the disabled input field can't capture click event.

so how do I disable it cross platform?

WoooHaaaa
  • 19,732
  • 32
  • 90
  • 138

1 Answers1

0

you can stop write in keypress as:

 $(document).keypress(function(e) {

            var key = e.which;

            if (key == 8 && e.target.attributes[0].value != "type of Element") {
                return true;
            }
            else{ return false;}

        });

you can set your element type to combobox.