Saving a file

J

Jake G

Hi,
I wrote a script to generate links to some pictures that I need to
regularly update our site with. Is there a way to write a script that
just saves the pics to a directory on my pc so I dont have to right
click on every link and do a save picture as...? I can't link
directly to the pics from our site because our site is https and the
site the pics are on are http so the user gets the security warning
box every time a pic loads.

An example file location is :

http://www.senate.state.oh.us/senators/bios/graphics/s_01_small.jpg
http://www.senate.state.oh.us/senators/bios/graphics/s_02_small.jpg
http://www.senate.state.oh.us/senators/bios/graphics/s_03_small.jpg
http://www.senate.state.oh.us/senators/bios/graphics/s_04_small.jpg

and so on...


Thanks,

Jake G.
 
T

töff

Use an "offline browser" is one way, probably the best.
"Save as" in your browser might be another.
Loading the pics into a page, and then copying them from your cache
folder, is another.
I don't think JS will save files, for security reasons.
 
S

Sandman

Jake G said:
Hi,
I wrote a script to generate links to some pictures that I need to
regularly update our site with. Is there a way to write a script that
just saves the pics to a directory on my pc so I dont have to right
click on every link and do a save picture as...? I can't link
directly to the pics from our site because our site is https and the
site the pics are on are http so the user gets the security warning
box every time a pic loads.

An example file location is :

http://www.senate.state.oh.us/senators/bios/graphics/s_01_small.jpg
http://www.senate.state.oh.us/senators/bios/graphics/s_02_small.jpg
http://www.senate.state.oh.us/senators/bios/graphics/s_03_small.jpg
http://www.senate.state.oh.us/senators/bios/graphics/s_04_small.jpg

and so on...

Short answer is "no". For a link to be automatically saved, a specific
header need to be sent by the web server that tells the browser to
download instead of view them inline.
 
J

Jake G

Use an "offline browser" is one way, probably the best.
"Save as" in your browser might be another.
Loading the pics into a page, and then copying them from your cache
folder, is another.
I don't think JS will save files, for security reasons.






- Show quoted text -

Thanks Töff, that is a good solution with the cache!!!! I just did it
and it works fine. Thank you so much.
 
D

Dr J R Stockton

In comp.lang.javascript message <[email protected]
oglegroups.com>, Wed, 9 May 2007 11:53:09, Jake G
I wrote a script to generate links to some pictures that I need to
regularly update our site with. Is there a way to write a script that
just saves the pics to a directory on my pc so I dont have to right
click on every link and do a save picture as...?

One assumes that you mean a script run in your browser.

IMHO, that's not the right tool. I've not done it myself, but I would
expect that Jscript/VBScript run by WSH, or a HLL exe, could do it. Ask
in the MS JS/VBS/WSH newsgroups.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,161
Messages
2,570,892
Members
47,431
Latest member
ElyseG3173

Latest Threads

Top