Save Target As

This is a discussion on "Save Target As" within the JavaScript Forum section. This forum, and the thread "Save Target As are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 14th, 2005, 08:44
SuperMember

SuperMember
Join Date: Dec 2005
Location: Netherlands
Age: 46
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Save Target As

Hi everybody,

I'm looking for a way to activate a download procedure without right-clicking on a link and using the 'save target as' option. My goal is to let the the 'save target as' procedure start after a click on a button. I don't know if this is possible in JavaScript. I hope somebody has an idea to lead me in the right direction.

Regards Hans
Reply With Quote

  #2 (permalink)  
Old Dec 14th, 2005, 10:23
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: Save Target As

just use
document.location.href = 'downloads/myfile.zip'
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
  #3 (permalink)  
Old Dec 15th, 2005, 09:07
SuperMember

SuperMember
Join Date: Dec 2005
Location: Netherlands
Age: 46
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Save Target As

Hello Rob,

Thanks for your reply,

I tried using:

Quote:
Originally Posted by Rob
just use
document.location.href = 'downloads/myfile.zip'
in my case
Code: Select all
document.location.href = 'Muziek/A%20Brand%20New%20Year%20(LR).mp3'
but this results in blanking the frame in which the button was pressed, and then nothing happens. Only after pushing the Refresh button in IE, Quicktime starts up with the loaded song. Also Dreamweaver starts complaining that the
Quote:
"Document has been modified outside of Dreamweaver. Do you want to reload it ?"
.
somehow I don't understand this. If I use i.e.
Code: Select all
document.location.href = '1024DownloadOrange01.htm'
it loads the page into the frame in which the button was pressed without problems. Do you have any idea why this happens ?

Back to my wish: what I really want is to get the Windows menu 'Save As' so I can save the file to my computer in stead of listening to it.
Any idea ?

Regards Hans
Reply With Quote
  #4 (permalink)  
Old Dec 15th, 2005, 10:09
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: Save Target As

What you need is a server side technology such as PHP / ASP to serve the file with a specific mime-type to force download.... I dont think this is going to be possible with javascript
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
  #5 (permalink)  
Old Dec 15th, 2005, 10:25
SuperMember

SuperMember
Join Date: Dec 2005
Location: Netherlands
Age: 46
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Save Target As

Thanks Rob,

I will look further in that direction,

Regards Hans
Reply With Quote
Reply

Tags
save, target

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Target _blank Jack Franklin Web Page Design 12 Oct 12th, 2007 09:55
Target Window Name jayaramgussy Web Page Design 9 Sep 20th, 2007 22:44
Validating target Lchad Web Page Design 16 Jan 18th, 2007 13:36
XHTML Target JacobHaug Web Page Design 7 Jan 4th, 2007 11:55
Frameset target help please charter Flash & Multimedia Forum 4 Mar 28th, 2004 10:05


All times are GMT. The time now is 19:16.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43