Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Javascript / Client Side Development

Saving a file


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.

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.

In article <1178736789.113962.159@p77g2000hsh.googlegroups.com>,
 Jake G <jgood@dps.state.oh.us> wrote:

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.

--
Sandman[.net]

On May 9, 2:57 pm, tff <t@arcticcoconut.com> wrote:

Thanks Tff, that is a good solution with the cache!!!!  I just did it
and it works fine.  Thank you so much.
In comp.lang.javascript message <1178736789.113962.159@p77g2000hsh.go
oglegroups.com>, Wed, 9 May 2007 11:53:09, Jake G
<jgood@dps.state.oh.us> posted:

>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.

--
 (c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk  Delphi 3? Turnpike 6.05
 <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
 <URL:http://www.bancoems.com/CompLangPascalDelphiMisc-MiniFAQ.htm> clpdmFAQ;
 <URL:http://www.borland.com/newsgroups/guide.html> news:borland.* Guidelines

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc