Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 180839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:39:25+00:00 2026-05-11T14:39:25+00:00

I’m trying to include a vCard export function in an existing page full of

  • 0

I’m trying to include a vCard export function in an existing page full of account information.

The ugly methods would involve 1, submitting a form to the same page, processing it and re-rendering the whole page, or 2, a GET targeting an iframe on the page. I’d really like to avoid both of those, but I may have to use #2 to achieve the goal.

Right now I have:

<input type='image' src='/intra/imgs/icons/vcard.png' onclick='$.post('/intra/vcard.php', { id: '992772', type: 'sponsor'});'> 

Which works in the sense that if I watch XHR activity in Firebug I see the request come back with the correct response, full of vCard formatted data. However it does not prompt the user to download the response as a file, even though the card is sent with:

header('Content-Type: text/x-vcard'); header('Content-Disposition: attachment; filename={$this->name_first}{$this->name_last}.vcf'); 

Am I doing something wrong, or is this just not possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T14:39:25+00:00Added an answer on May 11, 2026 at 2:39 pm

    I’m confused as to what exactly the problem is. Why not just do something like:

    <input type='image'        src='/intra/imgs/icons/vcard.png'        onclick='window.location='/intra/vcard.php?id=992772&type=sponsor';'> 

    And then return the appropriate download headers on vcard.php? When the browser gets those, it will stay on the same page and prompt for download. You will have to change your code to handle the variables as $_GET instead of $_POST but you should be using GET for this anyways.

    EDIT as pointed out in the comments, it would be even more appropriate to do this:

    <a href='/intra/vcard.php?id=992772&type=sponsor'><img src='/intra/imgs/icons/vcard.png'></a> 

    As then it would be accessible to users with javascript disabled.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 90k
  • Answers 90k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer To the best of my knowledge, you can't do this… May 11, 2026 at 6:02 pm
  • Editorial Team
    Editorial Team added an answer If the region is deselected, that sounds like you must… May 11, 2026 at 6:02 pm
  • Editorial Team
    Editorial Team added an answer It sounds like you want a CSS print style sheet.… May 11, 2026 at 6:02 pm

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am currently running into a problem where an element is coming back from
Seemingly simple, but I cannot find anything relevant on the web. What is the
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.