PDA

View Full Version : How can i refresh the page after the action?



gigas01
26 Jul 2012, 12:17 PM
For example, very simple UI like this.

The user enters the contents and after pressing the button,

I want to make the page be refreshed automatically.

What method should I use?






{
xtype: 'form',
name: 'detail',
url: 'http://localhost/ci_extjs_crud/index.php/user/addActivity',
items: [{
xtype: 'fieldset',
height: 128,
width: 632,
title: 'Enter New Activity',
//url: BASE_URL + 'addActivity',
items: [{
xtype: 'textfield',
fieldLabel: 'Activity',
anchor: '100%',
name: 'activityName'
},
{
xtype: 'button',
height: 37,
width: 53,
text: 'Save',
//ui: 'confirm',
handler: function() {
this.up('form').getForm().submit();
Ext.Msg.show({
title: 'Status',
msg: 'Success!',
icon: Ext.MessageBox.INFO,
width: 300
});
}
}],
}]
}

scottmartin
26 Jul 2012, 1:26 PM
I am not sure I follow... refreshed with data from the DB after submit? (form/grid?)

Scott.

gigas01
26 Jul 2012, 1:31 PM
I am not sure I follow... refreshed with data from the DB after submit? (form/grid?)

Scott.

nono I want to refresh the whole web page. like pressing F5 key. is it possible?

scottmartin
26 Jul 2012, 1:46 PM
You can use any of these:



window.location.reload();
history.go(0);
window.location.href=window.location.href;


Scott.