|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Preload Background Image Untill Real Content is Displayed
Hi
Iam new to this forum. I went through the article to preload images. Looks Good. I thought of implementing the same concept into my program but with a different stratergy. I want to load the background image for a few moment when the page gets loaded and then i want to display the actual content. I want to make use of ajax in doing so.Iam a beginner to ajax. so iam in need of your help. Your help is greatly appreciated Thanx in advance janakiraman |
|
#2
|
||||
|
||||
|
i dont know anything about ajax, are you working with javascript, if so, you could use something like...
<BODY ONLOAD="witch()"> <DIV ID="hid"></DIV> <DIV ID="page" STYLE="display:none"> page goes here </DIV> <SCRIPT TYPE="text/javascript" LANGUAGE="javascript" RUNAT="server"> function witch() { window.document.all.hid.style.display="none"; window.document.all.page.style.display="inline"; } </SCRIPT> hope this helped colton22 Last edited by colton22 : August 3rd, 2006 at 12:08 PM. Reason: thanks dzz |
|
#3
|
||||
|
||||
|
How long does your page really take to load?
For the record, coltron22 missed a closing triangle bracket on his <BODY> tag. ![]()
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter! DevArticles Forum Moderator "The net is a waste of time, and that's exactly what's right about it." -- William Gibson |
|
#4
|
|||
|
|||
|
Hi,
can this loading be done via ajax. If so can u help me by sending some sample scripts or... I have to get it done by ajax. Iam having around 5 images in the page which may vary depending on the id that i pass to the page. so, for each image i need to display the loading image and then the actual image. This should occur independently. Any help. greatly appreciated!!! Thanx |
|
#5
|
||||
|
||||
|
sorry, i dont even know what ajax is, ill reaserch it though, you have me wondering now.
lol colton22 |
|
#6
|
||||
|
||||
|
I don't see the value that AJAX will add to your page... Why are you preloading a background image anyways? Shouldn't it just be optimized and relatively small anyways?
|
|
#7
|
|||
|
|||
|
What i really want is my page will be similar to my.yahoo.com. Let us assume that my apge is divided into four quadrants. Each quadrant seperately loads an php file. Before loading these files in their respective quadrant i need to display an image saying loadig etc. This should occur independently, in the sense a php file may have loaded as the time taken to load that file would be a few seconds. where as another file will take a few more seconds. In that case the loading progress should be shown. In this way the loading should be done independently. Is this possible. If this is not the right place to get the answer can you suggest where can i find an answer for this.
Iam very much depressed as i couldnt think of what step to take to solve this. Thanks janakiraman |
|
#8
|
||||
|
||||
|
i understand what your talking about but do not know how to fix it.
on the other hand, if you get it to work, i do have an image that might work well for your situation. it is attached. colton22 |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Preload Background Image Untill Real Content is Displayed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|