I was able to get the onclick even to work, but there seems to be a delay. The event will not trigger more than once every few seconds. I have looked at the documentation and there seems to be a delay setting for the listener. I have included my checkbox definition code and was wondering if there was an easy way to disable the delay.
The unchecked function just does a msg box right now. What I want to accomplish is every time the checkbox is unselected, I want an "are you sure?" msg box. But because of the delay, the msg box does not always pop up. Am I doing the wrong thing, is there a better event to use? Any help would be appretiated.
Thanks,
var panel = new Ext.Panel({
layout: 'column',
bodyStyle : 'border-bottom: 1px solid #B5B8C8; padding: 5px',
items :[{
width:60,
bodyStyle : 'padding: 3px 0 0 15px', How access my SQLServer from home ?:: In left hand side pane, right click on the "SQL Server xxx" link. So check that its 1433 and make sure the server isn't hidden (a checkbox next to the http://answers.google.com/answers/threadview?id=326169HOME | Web site review of www.headphones.com:: Here is a chain of events that results in an a dead link: http://www.headphones. com/headphones/professional/koss_pro4aa.html Click on “Add to Cart. http://answers.google.com/answers/threadview/id/141690.htmlHOME |
items: [{
xtype:'checkbox', disconnecting from internet while running scandisc :: You may have a 'disable' button / checkbox, or you may be able to unselect your Once you have it, double click or right-click and choose properties. http://answers.google.com/answers/threadview/id/69585.htmlHOME | Weird delay before browser goes to web address:: I did have a checkbox on 'Automatically Detect Settings,' which I removed, Right-Click the wireless connection and then select "Disable". http://answers.google.com/answers/threadview?id=93578HOME |
onClick: unchecked,
dataID:'data.profile.selected'
}]
}]
});
You'll need some extra plumbing.
Example:
new Ext.form.Checkbox({
listeners: {
check: function(checkbox, checked) {
if (checkbox.skipConfirm) {
delete checkbox.skipConfirm;
return;
}
if (!checked) {
checkbox.setValue(true); // undo uncheck
Ext.Msg.confirm('Confirm', 'Are you sure?', function(btn) {
if (btn == 'yes') {
checkbox.skipConfirm = true; // without confirmation
checkbox.setValue(false); // uncheck
}
});
}
}
}
});
The beforecheckchange event is for checkItem, not checkbox. There are a few other "before" events i could try, but the onClick is a built-in listener. I am new to ext, so how would I add a custom listener? What would I need to add to my code to insert a new listener or change the delay? Some sample code would be nice.
Try using the beforecheckchange event. Check out the documentation to read about it.
http://extjs.com/deploy/dev/docs/#Ext.menu.CheckItem-events
I Am a Sinner – What About You?
Global Sourcing and Supplier Online by Dylan
|