Forum Moderators: open

Message Too Old, No Replies

how to preload background images with the help of ajax

I need to display a background image before the actual pictures comes into

         

janakiraman

9:45 am on Jul 28, 2006 (gmt 0)

10+ Year Member



Hi

Iam a beginner to ajax. I need to load an image in the background, before the actual image gets loaded. I have given a brief description about it in the following lines.

Each module should load separately from the others, i.e. each module should load in the background. While loading, in the space where the module will appear, a loading image should be displayed. This loading should be done via Asynchronous JavaScript and XML. When the module has fully loaded, the module HTML should replace the image. This should happen for each module. Each module should also auto-refresh every 3 minutes. This re-load should occur in the background and when each module has fully loaded the HTML of that module should be replaced by the new HTML. Each module should reload independently of all other modules.

Please help me in this regard. Thanx in advance.

Regards
janakiraman

moltar

10:23 am on Jul 28, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



sounds like homework... you don't need ajax and xml to preload images that for sure!

var myImage = new Image(); 
myImage.src = 'http://www.webmasterworld.com/ax/new2.gif';

janakiraman

5:08 am on Jul 31, 2006 (gmt 0)

10+ Year Member



Hi

Thanx for the reply. I need to make use of ajax in doing this. so please help me in achieveing this task with the help of ajax. Iam new to ajax so i find it difficult in doing this.

Your help is greatly appreciated.

Thanx

DrDoc

8:59 pm on Jul 31, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



AJAX deals with XML (text), which is not all that suitable for what you are trying to do. Were you planning on getting the image names via XML, or what?

janakiraman

5:40 am on Aug 2, 2006 (gmt 0)

10+ Year Member



Hi

Yes exactly. I need to get it via XML. How to achieve this. Please help me in this regard.

Thanx

whoisgregg

10:38 pm on Aug 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



janakiraman, it sounds like you are asking for someone to tell you how to "do" AJAX?

The term AJAX refers to any of dozens of different approaches to the problem of having the client fetch information from the server without a literal page refresh.

Perhaps using your favorite search engine to look for "Ajax tutorial" would get you started in the right direction.