View Full Version : Dynamic Ajax content - Loading Box
Ilyvm
04-12-2006, 06:04 PM
Dynamic Ajax Content
http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm
I'm using this script on my website. It's cool, but I need 1 more thing. Can it be posible to show a "Loading Page Box" when it's loading the new page on the iframe.
Thank you!
NXArmada
04-13-2006, 11:58 AM
its not an iframe.
But yes a Loading Page Indicator would be nice.
I would like to know how to add a "loading image" or some text that simply says "Page Loading" to the Dynamic Ajax Content script. :confused:
I am loading php pages with sql qurries that take some time to process.
Any ideas or links to a tutorial would be appreciated.
This script is exactly what I need if it could show some kind of status indicator. ;)
Thanks,
zee
jscheuer1
04-26-2006, 04:30 PM
Without testing but, using my knowledge of DHTML scripting, I'd try changing this:
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
to:
document.getElementById(containerid).innerHTML='Loading Page'
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
The part:
Loading Page
could be HTML, if desired:
<table align="center" width="100%" height="100%"><tr><td align="center" valign="middle" width="100%" height="100%">Loading Page</td></tr></table>
This would work well with a container for the content that is, say - a division with a set width and height.
The line of code you offered worked great! :)
Thanks jscheuer1.
I found this site to make a quick animated gif: (easy, but you can make your own)
http://www.ajaxload.info/
I changed the line you offered to:
document.getElementById(containerid).innerHTML='<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="49%" class="LoadingDataLeft">Hang On… </td><td width="2%" align="center" valign="middle"><img src="/loadingdata.gif" alt="LoadingData" width="32" height="32" /></td><td width="49%" class="LoadingDataRight">Loading Data… </td></tr></table>'
Works Great! ;)
NXArmada
04-27-2006, 01:43 PM
Awsome thanks
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.