Hello everyone,
Im kinda new here but this seems to be a great place to ask for this.
Thing is im developing a message module for this Php Zend Framework based app. The whole idea is that whenever i update a message it refreshes the information so i will be watching the very last updates on the messages.
For example i use Ajax Updater to send the info i wanna update (messages id's) and by using this sniplet i achieve the update:
Code:
Code:
var myAjax = new Ajax.Updater(target, url, {
method: 'post',
asynchronous:true,
parameters: {ids: lir, status: message_stat, type: typo},
evalScripts:true,
onComplete: refreshAll
}
);
$('messageForm').reset();
So pretty much it will update my info and reset the form wich is "almost" what im trying to achieve here. The other task is to reload the page with the very newest info (i believe you got the idea excuse for all the misspellings) so when i click on update it will send the info, do the update and refresh the data.
the question is.. how can i use Ajax.Update to reload the new info...

i tried it out using the onComplete:refreshAll
wich is pretty much a callback to the refreshAll method and its explained below:
Code:
function refreshThis(){
var url = '<?php echo Zend_Registry::get("contextPath"); ?>/message/goRequest';
var target = 'error';
var myAjax = new Ajax.Request(target, url, {
method: 'post',
asynchronous:true,
parameters: {ids:1},
evalScripts:true,
}
);
}
The /message/goRequest action goes to a controller but it does not refreshes anything, actually it loops away showing the preloader indefinitely.
I hope someone can understan this, its not that hard to do but im kinda new to ajax and do not know how the heck do this.
Any hints?
Best Regards and thanks in advance.
Jmc.