469,307 Members | 1,926 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,307 developers. It's quick & easy.

load a page in div tag with preloading

Hi my friends
I have a dive tag in my page,what I want is that when user click a link a html or php page loads in this div and during loading of the html or php file in the div a preloading shows.

thanks to help me.
Oct 5 '11 #1
7 2421
gits
5,390 Expert Mod 4TB
what do you have done so far?
Oct 5 '11 #2
I have made my preloader with css and javascript but because onload event dosnt support in div tag when the preloader shows with clicking the link it dosnt disapear after loading page into div,I have also used some codes but when the images are downloading(not after they downloaded) the preloading disapears.
Oct 5 '11 #3
gits
5,390 Expert Mod 4TB
things start to mix up - what exactly is to be loaded? basically you might use an AJAX-call to retrieve the html-code that should be placed in a div but if that html-code contains images then they are loaded through the src-attrib (new and own requests) so that you might need a n img-preloading mechanism too
Oct 5 '11 #4
what should be loaded is a complet html file including images.
Oct 5 '11 #5
gits
5,390 Expert Mod 4TB
that invalidates your html? a div shouldn't contain a 'normal' html-file.

anyway ... in case you want to really controll all loading with such a mask you have to preload the images and the page and find a way to sync that so that you know when to rmove the mask. it is not a trivial thing to do so you should need to know if it's worth the efforts
Oct 5 '11 #6
I need an ajax code in order to callback the complete load of all images in page?
Oct 5 '11 #7
gits
5,390 Expert Mod 4TB
no - you cannot load images via an XMLHttpRequest - to ensure you have all imgages loaded then you need an image-preloader like this
Oct 6 '11 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Francois | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.