/    Sign up×
Community /Pin to ProfileBookmark

ajax page loading

Hi There,

Does anyone know how or where to find a page loading script in AJAX?

I have a photo gallery, and I want to have the page loading screen on while the images load.

Thanks

to post a comment
JavaScript

15 Comments(s)

Copy linkTweet thisAlerts:
@cgishackJan 21.2008 — Do you mean just a small ' bust indicator' , or hide the whole page and tell the user the page is loading ?

Drew
Copy linkTweet thisAlerts:
@comptech520authorJan 21.2008 — Thanks for the reply,

I want to hide the whole page while it is loading.

Thanks
Copy linkTweet thisAlerts:
@FlukeyJan 21.2008 — You could consider using AJAX Libraries such as prototype or jQuery or extjs. They're all very good for this sort of stuff.
Copy linkTweet thisAlerts:
@comptech520authorJan 21.2008 — Do you have any examples on this?

Thanks kindly!
Copy linkTweet thisAlerts:
@comptech520authorJan 21.2008 — Thank you for those sites, but I still don't see anything on having the background screen being transparent black with a loading page while the page loads.
Copy linkTweet thisAlerts:
@A1ien51Jan 21.2008 — Ajax had nothing really to do with loading images.

You should look into an image preloader script.

Eric
Copy linkTweet thisAlerts:
@FlukeyJan 22.2008 — http://extjs.com/deploy/dev/examples/message-box/msg-box.html - look at those, i believe they're what you're after. You would just assign that message box to an ajax request, however, be aware that the extjs library is rather bulky and confusing for the first time ?
Copy linkTweet thisAlerts:
@comptech520authorJan 23.2008 — What exactally is an AJAX request?
Copy linkTweet thisAlerts:
@cgishackJan 23.2008 — it makes a request to the server and gets content/data.

Are you just wanting to preload [B]images [/B]and hide the page until they are all loaded?
Copy linkTweet thisAlerts:
@comptech520authorJan 23.2008 — yes, thats correct.

Got any ideas there?
Copy linkTweet thisAlerts:
@comptech520authorJan 24.2008 — anything on this?
Copy linkTweet thisAlerts:
@cgishackJan 24.2008 — You could wrap the whole page in a DIV and set the display to hidden.

Then preload all your images......

Then show the div by setting the display back to block or "".


You don't need ajax to get images, you just need the image URL's

Drew

Drew
Copy linkTweet thisAlerts:
@cgishackJan 24.2008 — Preload Images: http://www.pageresource.com/jscript/jpreload.htm

Show Hide elements
<i>
</i>
//***********************
//Show an element
//***********************
function showEl(el)
{
el.style.display = "";
}

//***********************
//Hide an element
//***********************
function hideEl(el)
{
el.style.display = "none";
}


Drew
×

Success!

Help @comptech520 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...