JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 12th, 2005, 02:52 PM
ezenaide's Avatar
ezenaide ezenaide is offline
custom user
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: olinda - br
Posts: 78 ezenaide User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 13 h 29 m 52 sec
Reputation Power: 14
Send a message via MSN to ezenaide
'save target as' with javascript?

It is possible?

I have create a menu wich is related to some images. This menu has links like 'save image 001', 'save image 002', etc.
But, since they're jpg's, clicking any link will open the images on the browser.
That's why i want any way to use javascript - i'm not using database - to activate the 'save target as' window.

I found some code searching on google, but didn't work :P

Any suggestions?

Reply With Quote
  #2  
Old April 12th, 2005, 03:32 PM
ChiefWigs1982's Avatar
ChiefWigs1982 ChiefWigs1982 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: I have emerged from the place of spells and fairies
Posts: 97 ChiefWigs1982 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 17 h 35 m 12 sec
Reputation Power: 14
You could use execCommand(), but that's only gonna work in IE.

Your best option is to use a server side script to set the headers
and force the file to download...

Reply With Quote
  #3  
Old April 20th, 2005, 03:56 PM
errodr errodr is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 7 errodr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 46 m 22 sec
Reputation Power: 0
You could simply use the "Content-Disposition" header to tell the browser that you would like the "Save" dialog box to ask the user what to do.

Reply With Quote
  #4  
Old April 20th, 2005, 06:02 PM
ChiefWigs1982's Avatar
ChiefWigs1982 ChiefWigs1982 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: I have emerged from the place of spells and fairies
Posts: 97 ChiefWigs1982 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 17 h 35 m 12 sec
Reputation Power: 14
Quote:
Originally Posted by errodr
You could simply use the "Content-Disposition" header to tell the browser that you would like the "Save" dialog box to ask the user what to do.

That's what my second point/link alluded to...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > 'save target as' with javascript?


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap