Topic: Avoid a complete page request during an xajax response callback.

I have a member's page that signs in several people into the website (standard) and loads several classes, includes, YAHOO's GUI.  Takes a short while with the load, but not too bad at the moment.  During that load, which is in the standard main.inc include on all pages, it checks if a member is signed in and if so, completes the page, or if not, sends them to the sign in page again.

On to the xajax ..

In that first page, I currently adding some xajax callbacks that run AFTER the page is pushed to the member's computer (just a plain javascript execute of xajax_getMail, xajax_getContacts, ... ). Noticing that on these callbacks, each one is basically reprocessing the webpage just like someone has come to that page for the first time. 

.. so say, the first standard load of the page takes 5 secs ..  each xajax callback adds another 5 secs on top.

Wondering how to attack this problem.

Re: Avoid a complete page request during an xajax response callback.

addit. note. When I mention reprocessing the webpage, I mean by time of the callbacks ..  not meaning the page actually reloads again.

Re: Avoid a complete page request during an xajax response callback.

Perhaps you could handle all of them in a single call...

Ed

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

Re: Avoid a complete page request during an xajax response callback.

I'll try out the single call for the requests for reducing the time.

Do you know an easier way to make a callback without it being like a page reload again?  Like changing the location of the xajax callback or a way to skip part of the script outside the xajax function being called?

Re: Avoid a complete page request during an xajax response callback.

When a page initially loads, everything is processed...

When an xajax call arrives at a page, everything UP TO the processRequest() call is processed. This is because the processRequest function intercepts the xajax call, processes it and returns to the client effectively ending the page processing.

So, put everything you do not want processed at each xajax call after the processRequest() call.

Ed

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.