View Full Version : Ajax Loading Problem

12-04-2008, 11:47 AM
I need one solution i am using ajax combo box in my site which is in php mysql. it's working fine but it is taking some more time to load this ajax combo box.
right now i am loading box on body onload function can any one tell me that how can i load this combo before page load.
So that first combo will load and then page will load.
It's urgent please give me any suggestions.
Thanks in advance

12-04-2008, 07:48 PM
Why not avoid client-side ajax and just echo it out using a PHP include?

If your goal is to retrieve data on or before your page's load, AJAX is kind of not the way to go. You can use things like iframe srcs and JS xmlhttprequests, but the whole idea of AJAX is to retrieve/display data during runtime. If you want to retrieve/display BEFORE a page load, just use includes (or for ASP, xmlhttprequest).