Hi, For my project i like to do something just like the Google homepage. Multipal ajax request at the same time and all loading content from different php pages. It should be done at loading the page so the obvious choise would be to make a on load statement but as far as i know i can only place 1 function there...or am i mistaken? Edwin
Oh the reason why i want to use ajax in combination with php is that i have 20 php pages that all do ther thing and i only want to show the result on that page. I do'nt want to put it in 1 page and let it run thru the 20 process and wait for the whole thing to end.
You could easily write a javascript function that acts like a task manager. Maybe something like this: function Task_Manager(){ function1(); // call the first function function2(); // call the second function function3(); } Each function would use ajax to load the PHP script you want. So the only thing left is to call the task manager function onload.
Found the solution. Was indeed like Noam says. I was somehow thinking that if i did it like that the functions would be waiting for each other to finish before starting the next. That was not true so this works. Thanks
You may try my KoolAjax control, built explicitly for PHP Here is the example of multiple/simultaneous requests: http://www.koolphp.net/support/demos/#koolajax.example_simultaneous_requests
KoolAjax looks good. is the multipal request synchrone and independent of the response of each request or does it wait till it's ready with all processes
The multiple requests/responses of KoolAjax are all independent. It does NOT wait until all processes ready to update the page. Check out the UpdatePanel feature of KoolAjax, that panel makes KoolAjax special.