Need help on download Vcard -Javascript

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.



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

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 25th, 2007, 01:25
New Member
Join Date: Oct 2007
Location: New York
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Red face Need help on download Vcard -Javascript

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
Attached Files
File Type: zip testing.zip (91.2 KB, 9 views)
Reply With Quote

  #2 (permalink)  
Old Oct 25th, 2007, 06:21
Up'n'Coming Member
Join Date: Jun 2007
Location: Germany
Age: 22
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Lucleonhart Send a message via MSN to Lucleonhart
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:
Code: Select all
AddType application/octet-stream vcf
What is that?!
You redefine the "vcf" file extension here. You make it look like a zip file! And zip files need to be downloaded.

Have fun.
Reply With Quote
  #3 (permalink)  
Old Oct 25th, 2007, 13:18
New Member
Join Date: Oct 2007
Location: New York
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Reply With Quote
  #4 (permalink)  
Old Oct 25th, 2007, 13:19
c010depunkk's Avatar
SuperMember

SuperMember
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to c010depunkk
Re: Need help on download Vcard -Javascript

just ".htaccess"
Reply With Quote
  #5 (permalink)  
Old Oct 25th, 2007, 13:31
New Member
Join Date: Oct 2007
Location: New York
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Talking Re: Need help on download Vcard -Javascript

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..
Reply With Quote
  #6 (permalink)  
Old Oct 25th, 2007, 13:42
Up'n'Coming Member
Join Date: Jun 2007
Location: Germany
Age: 22
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Lucleonhart Send a message via MSN to Lucleonhart
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.
Reply With Quote
  #7 (permalink)  
Old Oct 25th, 2007, 14:16
New Member
Join Date: Oct 2007
Location: New York
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up Re: Need help on download Vcard -Javascript

It works!!! Thank you very much.
Reply With Quote
Reply

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
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


All times are GMT. The time now is 10:27.


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