PDA

View Full Version : Problem with Keymap



FlaminPhoenix
27 May 2009, 1:45 AM
Hi guys,

I am using Ext.KeyMap to handle keyboard shortcuts.. here is my code

var ref=new Ext.KeyMap(Ext.get(document), {
key:'R',
ctrl:true,
fn:function(e){
//some actions...
//Alert message comes here..
},
stopEvent:true
});

The problem with the above code is that whenever i hit ctrl+r, if the alert message is present, it shows up and then does nothing, which is the intended functionality. But, if the alert statement is removed from the above code, then the Ctrl+r invokes the refresh of the page. HELP!!! I want to prevent this! I want to use the above code without the alert message, and at the same time prevent the page refresh. My browser is IE 7 by the way. thanks in advance...:))