HTML - A Href + Link To Download File
Hello,
I have a simple web page that contains an href link. When a user left clicks the link I would like to download a file. Testing the page local to my pc works fine, but when I uploaded in a Server, didn't worked correctly. Instead of downloading the file, it actually opens the file. What should I change? I am using a vserver in Plesk enviroment if that is of any use. Should I change something to the server? Similar TutorialsI need to create a link on my company's website. Once the users click the link, it should download an excel file. the file is dynamic and it should change according to the person that logs in.. I am new to html. can you guys provide me ideas to do this... Thanks Ragha Hi all, I need to have a link on my web page which allows the user to download a file on the c: drive of my web server. Basically when they click the link they will be prompted to download this file. Any ideas on how this can be done? I tried the following on FF but it does not work... <a href="file:///C:/testUpload/CA_P1470H_2008-1209-143322.xls">major_bob_12-09.xls</a> Thanks in advance for any help. I have placed some mp3 files into a folder in my httpdocs. Then I emailed the link to a file. When I select the emailed link, the mp3 plays. But I'd like to download the file, but I don't see where/how. When I right click the link, my only choices a Select All Look Up... Translate... The greyed-out (unavailable) choices a Cut Copy Paste Clear Shouldn't it be when I right click the link the choices should be Save Save As I'm using IE, and the same is true when i put the url in the browser of when I Alt-F. Save is still greyed out. How can I do this correctly so it's easy to download the file? Thanks. Hi, I like to know how to make a file download in a new window, like most sites have, I want to add some adsense in that page along with the link to the manual download link if automatic download fails. Thnx hi, can someone tell me how to write a link to force the download option to appear in the browser when my link to an XML page is clicked, not just open it as a page in the browser. Cheers Martin I have taken over a newsletter and was attempting to recreate a menu item using Dreamweaver used by the previous author in the newsletter menu that she created using constant contact and was successful of course on my computer, but when I sent out the newsletter, if one used the a href link instead of being taken to the document a name link as intended it began a search on the recipients computer. Any suggestions. Thanks hello, i'm having a problem where i have a simple link on my web page, when i click on this link i want a window to open in the center of the screen with simple text and a close button. in a standalone environment, the following code almost does it for me: Code: <html> <head> <script> <!-- function wopen(url, name, w, h) { w += 32; h += 96; wleft = (screen.width - w) / 2; wtop = (screen.height - h) / 2; var win = window.open(url, name, 'width=' + w + ', height=' + h + ', ' + 'left=' + wleft + ', top=' + wtop + ', ' + 'location=no, menubar=no, ' + 'status=no, toolbar=no, scrollbars=no, resizable=no'); win.focus(); } // --> </script> </head> <body> <a href="page1.html" target="popup" onClick="wopen('page1.html', 'popup', 300, 200); return false;"> Open Window</a> </body> </html> My question is, how do integrate this into my webpage. In the place where I have the link, I obviously have to use the "<a href="page1.html"..." but how do I seperate the function wopen and the html page above. Because the way the above code works is that it gives me a "Open Window" link, when I click on it - the new page also has the "Open Window" link in it. any guidance will be helpful. thanks! I'm having trouble providing the best download experience for my users across all browsers. In my opinion, the best experience is to have the user stay on the same page and just have the save dialog box pop up. Here are three ways I've tried: HTML Code: <a href="installer.exe">download installer</a> <a href="installer.exe" target="_blank">download installer</a> <a href="javascript:void(0)" onclick="dynamicallyInsertIframeWithExeAsSource()">download installer</a> All three behave differently in different browsers. Some will open a new browser window that covers the current one. Others flicker that new window briefly before closing it. Some will just whiten out the current page. I just want to know what method will work consistently across all browsers and not have new windows popping up, weird flickering, or whitening. Ok so I am tryin to make a link to where a person can download a file from my website. Not quite sure on how to do this. Any answers? Hello, I can't seem to find the syntax which allows users to download a file by clicking on a link. For example, a user would click on a "Download" link which would pop up the download dialog box which prompts the user to save the file to their hard drive. Simply doing an a href link opens up and plays the file instead. Just to note, the file they would be downloading would be an mpg file. Thanks in advance for your help! so basically i just want to put a download link on my website, where you click on it and the download thing pops up, just a file from my server Probably an question that everybody will be able to answer, but Im a total newbie :-) I know that is has something to do with a ftp client hehe will be happy for any help, thx guys and girls anyway :-) Don Say for example i wanted to create a stream for an mp3 file, i would create an .m3u file with just the url location inside. Could i create some kind of extension for a 'normal' file such as a rar. or zipped file. Just the url location inside some kind of file? Is there a way to setup a link to download (or offer to download with the open/save box) a jpeg rather than display it in the browser? Hello, I'm not sure where else to turn with this question, so I apologize if it's not forum-related. I need to add a link to an HTML doc that would open that same page in a new "printer-friendly" pop-up window. The problem is that the address of that page would always be different because it is being generated on the fly by users doing a search through our database of keyworded photos. An example of this address would be: http://ourwebaddress/netpub/server.n...here&template= results.np&field=Keywords&op=matches&value=Dallas&value=brownstone&field2=Keywords&op2= matches&search=View+Your+Search+Results This address shows images based on my search for "Dallas" and "brownstone," and because this address would change with every new search it's useless as a permanent link. Is there an HREF link command (or perhaps something else) that would simply open the existing page in a new window, no matter what the page's current HTTP address is? Any insight with this would be very appreciated! Many Thanks! Hi, I am building the download centre of http://www.i-conica.net I have a directory structure similar to the image in this thread. http://forum.i-conica.net/cgi-bin/fo...?m-1207092405/ The bottom image, my plan is to have the download page, with continually updated information on the new versions of software, put the software files in a separate folder and link to the folder, i thought if there were only one file in there ending .exe it would download it? It doesn't it just displays the directory. I wanted to be able to just throw the files in their own folder and not have to worry about changing links to the file. because the folder would remain the same. Is this possible? Thanks. what's the HTML code to download a pdf from a link. please help i really need this code for my website.. The following webpage uses an a href to turn the chunk of java code into a link to the bottom of the page, while this works in Safari it doesn ot in FireFox v2/3 (I have not got IE, can somebody confirm). How can I make the java applet link work under FF? http://lovelago.googlepages.com/java_button_2.html Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><!-- charset must remain utf-8 to be handled properly by Processing --> <meta http-equiv="content-type" content="text/html; charset=utf-8"><title>java_button_eg : Built with Processing</title> <style type="text/css"> /* <![CDATA[ */ body { margin: 60px 0px 0px 55px; font-family: verdana, geneva, arial, helvetica, sans-serif; font-size: 11px; background-color: #ddddcc; text-decoration: none; font-weight: normal; line-height: normal; } a { color: #3399cc; } a:link { color: #3399cc; text-decoration: underline; } a:visited { color: #3399cc; text-decoration: underline; } a:active { color: #3399cc; text-decoration: underline; } a:hover { color: #3399cc; text-decoration: underline; } /* ]]> */ </style></head><body> <a href="#Bottom"> <div id="content"> <div id="java_button_eg_container"> <!--[if !IE]> --> <object classid="java:java_button_eg.class" type="application/x-java-applet" archive="java_button_eg.jar" standby="Loading Processing software..." height="100" width="100"> <param name="archive" value="java_button_eg.jar"> <param name="mayscript" value="true"> <param name="scriptable" value="true"> <param name="image" value="loading.gif"> <param name="boxmessage" value="Loading Processing software..."> <param name="boxbgcolor" value="#FFFFFF"> <param name="test_string" value="outer"> <!--<![endif]--> <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/update/1.5.0/jinstall-1_5_0_15-windows-i586.cab" standby="Loading Processing software..." height="100" width="100"> <param name="code" value="java_button_eg"> <param name="archive" value="java_button_eg.jar"> <param name="mayscript" value="true"> <param name="scriptable" value="true"> <param name="image" value="loading.gif"> <param name="boxmessage" value="Loading Processing software..."> <param name="boxbgcolor" value="#FFFFFF"> <param name="test_string" value="inner"> <p> <strong> This browser does not have a Java Plug-in. <br> <a href="http://java.sun.com/products/plugin/downloads/index.html" title="Download Java Plug-in"> Get the latest Java Plug-in here. </a> </strong> </p> </object></a> <!--[if !IE]> --> </object> <!--<![endif]--> </div> <p> </p> <p> Source code: <a href="http://lovelago.googlepages.com/java_button_eg.pde">java_button_eg</a> </p> <p> Built with <a href="http://processing.org/" title="Processing.org">Processing</a> </p> </div> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><a name="Bottom">Bottom</a> </body></html> Hi everyone, I was asked to upload a video to our server... and I added this code to the webpage when I click it, a download does not start... it just says page not found Code: <p align="center"><br> <font face="Arial"><b><br> Click the link below to watch the video</b></font></p> <p align="center"><b><font face="Arial"><a href="..IMG_1953.MOV">MDS</a></font></b></p> Hey guys! It's been awhile, but life has been busy and doing new things with web pages hasn't been on the top of my list. However, I've run into a small issue which will hopefully be easy to solve. I've been doing some scripting for a program which exports and imports scripts in an XML setup. I've been posting those scripts on another site, and, for now, have been instructing users to simple right+click save as... the scripts in order to get them, because, when they click on the link, it tries to bring them to a page of the XML. Is there any way for me to tell the links to simply download the XML file (effectively like right+click save as... except it will go to wherever they download stuff) if it is clicked? I have this; You can download a <a href="hpswmtmreg.doc">Word Document</a> file, (click to open, right click to download). <br><br> You can download a <a href="hpswmtmreg.zip">Zip</a> file, (right click to download). I thought it was simple, straight forward, but I get server errors (from my host). Is there something special abpout .doc files or .zips for that matter. Am I doing something wrong? Thanks |