Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Old 02-18-2008, 06:13 PM Ajax.Updater problem
Junior Talker

Posts: 1
Name: chuty
Trades: 0
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.
chutyman is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Ajax.Updater problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.34577 seconds with 12 queries