This is a discussion on "Need help on download Vcard -Javascript" within the JavaScript Forum section. This forum, and the thread "Need help on download Vcard -Javascript are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Need help on download Vcard -Javascript
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Hi everyone,
I intend to put my vcard into my html page. I tried to put this script into the rollover image to link to targeted file and hoping to be able to downloaded by user. BUT it ended up open the page with unreadable text. How to solve this problem? Do I need to put any javascript or class..or something.I'm not a good in scripting. Please help, I appreciate it very much. Glazeginger |
|
|
|
|||
|
Re: Need help on download Vcard -Javascript
No, you do not need any Javascript. Put a file named ".htaccess" in your directory where the html page is. The ".htaccess" file can modify server informations.
So, now you want the server to send your vcf file as a downloadable file. Normally the browser can display the content (it is plain text!), so he does! But you can make your server lie! ^^ So it will say "vcf files cannot be displayed!!" To do so, edit the ".htaccess" file and add one single line:
You redefine the "vcf" file extension here. You make it look like a zip file! And zip files need to be downloaded. Have fun. |
|
|||
|
Re: Need help on download Vcard -Javascript
Thank you for your rely.
Oh I see what you mean. I will create the ".htaccess" file into that directory. Should it be named "xxx.htaccess" or just ".htaccess"? Sorry, I never tried this before. Thank you so much! |
|
||||
|
Re: Need help on download Vcard -Javascript
just ".htaccess"
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
|||
|
I just created the .htaccess (from dreamweaver) into that particular directory (local drive). But I did not see the file appeared. How am I going to upload to server? I'm using mac, is there anyway to display it, so that I can upload that file to server?
Thank you.. |
|
|||
|
Re: Need help on download Vcard -Javascript
Which FTP program do you use? I am using Filezilla. There is an option in the menu "show hidden files", activate that.
An alternative would be saving as "a.htaccess", uploading, and renaming the file to .htaccess after the upload! BTW: you can use the simple editor.exe for such things. |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Download button - to download a PDF file | attila001122 | Web Page Design | 3 | Dec 9th, 2007 16:09 |
| Download | crackafaza | Website Planning | 2 | Oct 10th, 2007 13:13 |
| Download tracker | kokuszka | Other Programming Languages | 0 | Nov 19th, 2006 13:09 |
| Top 20 for most download - how? | mikka23 | PHP Forum | 9 | Aug 15th, 2006 18:28 |
| Download | djforemanuk | Introduce Yourself | 1 | Oct 2nd, 2005 15:50 |