Welcome visitor
* Login
* Register
It is currently September 20th, 2019, 9:32 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  Form to download not to upload a file
PostPosted: November 24th, 2009, 11:09 pm 

Posts: 17
Do you know if forms have something like the input type="file" but to download and not to upload a file? Does that make sense?


Top
 Profile  
 
  Re: Form to download not to upload a file
PostPosted: November 25th, 2009, 3:33 am 
User avatar

Posts: 21
If all you need is a button to click and download a file, you can use one of the following approaches:

Without JavaScript:
<form action="path-to-your-file">
  <input type="submit" value="Click here to download" />
</form>

Using JavaScript:
<input type="button" value="Click here to download" onclick="window.location.href='path-to-your-file'" />


Keep in mind that some people disable JavaScript from their browsers, so the second option may not always work.

I hope this helps.

_________________
IT. Consulting
www.tnogos.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron