473,799 Members | 2,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

wait for image to download

Hi,

I have a html which have a <imgtag. Since it takes quite some time to
download the image when user visit the page, I would like to show a
small animation at the same location of the <imgfirst. When the image
is totally downloaded, I would like to discard the animation and
display the image at the same location. How can I do it?

Thanks,

qq

Jul 8 '06 #1
2 2386
qu******@yahoo. com said the following on 7/7/2006 10:01 PM:
Hi,

I have a html which have a <imgtag. Since it takes quite some time to
download the image when user visit the page, I would like to show a
small animation at the same location of the <imgfirst. When the image
is totally downloaded, I would like to discard the animation and
display the image at the same location. How can I do it?
Use two images. The animation and the large one. Center the animation on
the large one. Hide the large one using CSS. Use the onload event for
the page to trigger a function that will hide the animation and display
the larger image.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 8 '06 #2

Put your <imgin a <span style="backgrou nd: url(smaller-image.gif);min-width:
100px;min-height: 100px"element, and put your <imgin it, the small one, as the bgimage of
the <spanwill show, as it'd be responded quicker from the server, will show in the
background, until the big image is fully loaded. You could give the bgimage a
background-position, so it shows at the bottom in order to have it there till the bigger image
covers it.

Danny
Jul 8 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3047
by: Markus Franz | last post by:
Hi. I created a little script: for currenturl in sys.argv: pid = os.fork() if pid == 0: signal.alarm(10) do_something() # placeholder for the download and print routine
49
2660
by: Lauren Wilson | last post by:
Hi folks, Just wondered if, for the sake of clarity, it is permissible to post small image files of an error box along with a text message about a problem with Access?
4
2854
by: David W. Simmonds | last post by:
Is there a way I can have a button on a ASP.NET form that when clicked will allow the user to save the image to a file on the client side? I know that the user can simply rclick the image and select Save Target as..., but the button might be a more intuitive way.
4
2327
by: moondaddy | last post by:
Using vb.net I need to download image files to the client browser where they can save to disk. Below is some sample code I'm using. when I run this the File Download window in the browser says: File name: ViewAttachment File type: From localhost 1) "ViewAttachment" is the name of the aspx page and not the image file. 2) Its not picking up the file type of jpg. For ContentType I used
8
2406
by: kieran | last post by:
Hi, I want to download an image from the web and save it locally. I have spent all day messing about with this and am still no where. We have a firewall so i use the below code. I know it works down to the line as i also use this code to download an xml file from the net. I have been messing around with all sorts of ways to stream the image into a local file and save it. but no luck. Am i totally off key here, can anyone point me...
6
22135
by: ruca | last post by:
Hi gurus, I have a imagebutton in my WebForm, and I want that when I click (mouse down) on her the imagebutton change image and when I "unclick" (mouse up) change to the original image. Basically I want to know how can I have the mousedown and mouseup buttons events. I think that I have to do this in JavaScript. Can you help me on this?
2
6026
by: bigpoppa | last post by:
Hey I need help (doesn't everyone?) on a script. The script functions like this: Please wait X seconds for download (for example x=15 seconds) Please wait 14 seconds for download (and then a second later) Please wait 13 seconds for download... (process keeps repeating) Click here to download the file you requested (occurs at 0 seconds) Does anyone know of a script like that one? I have seen many sites use it including megaupload.com. I am...
15
4514
by: Baron Samedi | last post by:
Every so often, I see someone wanting to prevent heir images being downloaded and the general consensus is "you can't". Now a friend has asked me to think some more about this, and I think that I might have a solution. It is somewhat complicated, but it probably ought to work.... Forget disabling right click menus and the like, it seems to me that the problem is screen capture.
1
2399
by: Lastknight | last post by:
Hi all, i am looking for your help regarding this topic... I am trying to download a image from the web through perl program. I have used Image::Grab module for that task,through the module i am able to download the image.... But my problem is i want to get that image to be stored in the particular file path,(eg)" /home/image" ..I dont know how to do this...can some one heil me to overcome this problem..
0
10495
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10269
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10248
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7573
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5597
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4148
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2942
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.