Jump to content

Downloading a .gpx file


Rubiconlwb

Recommended Posts

I would like to be able to have my users download a .gpx file which I have on the website server. I have successfully done this in the past with a .zip file and utilizing the window.open method but when I tried that with this file, all I get is another webpage with all the data shown, it does not actually download the file. I am not technically advanced even though I have been creating and maintaining websites for several years. I did some research on the internet and tried several things that were suggested, some did the same thing and others did not work at all. Any suggestions? I am willing to try anything. Is there something special about this type of file? Below is my recollection of the process I used. <input type="button" value="Download" onclick="window.open('wfrawlins.gpx')"> Any help you can give would be greatly appreciated

Link to comment
Share on other sites

My single experience with downloading files were .zip and simply linked to the file. I'd think though that if it could display, it would display the contents. For example you wouldn't be able to do this method for a .html file, clearly. I'm not sure what sort of file .gpx is though. Find out if there is a way to directly download a regular .html or .txt file, or even I'd imagine a .pdf would display in a new window. What goes in the parenthesis is what you want to open in a new window.This could be a page on your server, a direct url, or I'd even think an image. I read here that .zip files will download automatically. But another method will need to be used for other files I guess. It does give a PHP trick, there might be other methods though. I just found this with a simple Google search. :google_lt:http://webdesign.about.com/od/beginningtutorials/qt/html_dwnld_tag.htm I bet the people in the JavaScript forums could be of better help. :Bucktooth:

Link to comment
Share on other sites

I followed the suggestions given in the link and it worked! Thanks so much for the assistance. I spent a couple hours searching google for a solution and came up with nothing that worked. Lots of suggestions but nothing that actually worked. I came up with one solution that downloaded a file, just not the one I wanted downloaded! LOL

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...