View Full Version : [SOLVED] Simulating pagging click - How?
franzisk
5 Jun 2007, 10:14 AM
How can I simulate a pagging click (until last page)?
tryanDLS
5 Jun 2007, 11:07 AM
This was just discussed yesterday (http://extjs.com/forum/showthread.php?t=7045).
franzisk
5 Jun 2007, 11:58 AM
Thanks but I took a loot at that thread and this doesnt work for me (I have Ext 1.0.1)
var paging = new Ext.PagingToolbar(gridFoot, ds, {
pageSize: records_per_page,
displayInfo: true,
displayMsg: 'Displaying {0} - {1} (total: <b>{2}</b>)',
emptyMsg: "No profiles to show"
});
...
total = ds.data.getCount();
for(i=0; i<total; i++){
grid.getSelectionModel().selectRow(i);
selectedRow = grid.getSelectionModel().getSelected();
memberEmail = selectedRow.data.email;
username = selectedRow.data.username;
arg = 'id=1&msg=Some message&email='+memberEmail+"&username="+username;
new Ajax.Request('action_setMessages.php',{
parameters:arg,
method:'post',
onSuccess:function(t){
var ret = t.responseText;
Ext.message.msg('Email Sender', 'Email sent to '+username);
},
onFailure:function(t){
alert('Error: '+t.status + ' - ' + t.statusText);
}
});
}
paging.next.fireEvent('click');
BernardChhun
5 Jun 2007, 12:20 PM
this works for me:
paging.onClick('next');
franzisk
5 Jun 2007, 12:26 PM
Thanks a lot, worked
tryanDLS
5 Jun 2007, 1:19 PM
I don't know what you're trying to accomplish, but please go back and read the whole thread. Calling fireevent wasn't the solution. Saying "it doesn't work for me" doesn't tell anybody anything.
cobnet
5 Jun 2007, 4:13 PM
I have noticed that when you make the coding changes required for this action and it is a change from the previous js file. You may need to clear your browser history and cache as well as close IE to see the actual changes take place.
I know I had the coding correct several times before I was actually able to see it work.
Just food for thought here.
Mark
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.