I have an ExtJs (ExtJs 4.2) Split button that drops down to give me several options of my choice. Each option is redirected according to my business logic.
My question is: When I right click on one of the options and click open in a new tab, the same page is opened in the new tab with a '#' appended at the end of the same URL. How do I get this to work properly? Thanks.
My ExtJs code -
Ext.onReady(function () {
var but = new Ext.FormPanel({
items: [{
xtype: 'splitbutton',
text: 'Choose an action',
width: 250,
scale: 'medium',
rowspan: 2,
renderTo: Ext.getBody(),
margin: '5 15 15 510',
border: true,
handler: function () {
Ext.Msg.alert('<center><br/>Select an option from drop down menu!<center>');
},
menu: [{
text: 'Create Student Record',
anchor: '100%',
handler: function () {
but.getForm().doAction('standardsubmit', {
target: '<_s></_s>elf',
method: 'POST',
standardSubmit: true,
formBind: true,
url: 'createrecord.jsp'
})
}
}, {
text: 'Create Class Details',
anchor: '100%',
handler: function () {
but.getForm().doAction('standardsubmit', {
target: '_self',
method: 'POST',
standardSubmit: true,
formBind: true,
url: 'classrecord.jsp'
})
}
}]
});
Ext.create('Ext.Button', {
text: 'Logout',
margin: '-85 10 10 1200',
scale: 'medium',
renderTo: Ext.getBody(),
handler: function () {
but.getForm().doAction('standardsubmit', {
target: '_self',
method: 'POST',
standardSubmit: true,
url: 'LogoutServlet'
})
}
});
});