faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 22 people (23%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How to download a gif file from a remote server?

Apr 5th, 2008 20:19
ha mo, Colin Fraser, Kiranmayee Kiranmayee,


Is this question in the right place??? Are you talking about basic use
of the browser? or basic HTML?  In any case, using Javascript for this
is totally inappropriate, unless you want to do something really fancy. 
For basic use of the browser:
   right click the image and select "Save Image(name.gif).." 
   When the "Save As" dialogue appears, just save it where you want it. 
For basic HTML
   <img src="http://www.someserver.org.au/members/name/folder/img.gif">
This code will download the image from the nominated address and display
it in your page.  Yuo require the entire address for this to work.
However, you also need the image to be there all the time or it does not
work. 
As for something really fancy, I am afraid i am a minimalist, the more
code there is, the greater the chance of it not working for anyone. This
is not the "Rocky and Bullwinkle" show where Bullwinkle says: "Hey
Rocky, watch me pull a rabbit out of my hat!"
Rocky:"But that trick never works"
Bullwinkle then pulls his sleeve off and proceeds to make a mess of the
trick, making some comment about getting a new hat or trick or something. 
More and more pages are doing this sort of tricky stuff and making a
mess of it on more and more browsers. Yahoo for example uses some sort
of banner image to track their users, I use an anti-banner program,
ergo, I only get blank pages from Yahoo, needless to say I dont use
Yahoo for anything anymore. So be careful about how clever you want to
get.
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com