开发者

Parse vcard with Javascript

I have a Ruby on Rails app which handles contacts. Now I want to give users the possib开发者_JAVA百科ility to drag and drop cards on the page and create a contact this way.

By using the HTML5 file API I get the vcard contents in Javascript. So I thought: why even send a request to the server, why not parse it n Javascript?

Unfortunately I can't find a library which does this. Can't be too hard? Any ideas? I would really prefer this solution for simplicity and less hassle on the server side...

Thanks a lot, Tom


I've done a quick serch for js vcard and found this vcard.js script. Hope this helps.


A project of mines: https://github.com/ProfessioneIT/jsvcard

I hope it's useful because part of the project was devoted to a platform independent vCard parser written in Javascript. It also solves some encoding problems you normally find when you want to read a vCard.

EDIT: btw. the link from Spadar Shut is now broken (03.06.2015)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜