Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Oct 2007
    Posts
    24
    Thanks
    2
    Thanked 0 Times in 0 Posts

    javascript for pdf download

    Hi,

    I don't know javascript but I need code to download a pdf to a website visitor. I am using wordpress contact 7 plugin which can redirect to javascript upon successful form submit. Appreciate if anyone could help me.

    Thanks,
    Gibs

  2. #2
    Master Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    5,823
    Thanks
    26
    Thanked 606 Times in 599 Posts
    Downloads are served by the server (i.e. PHP), not the client (JS).
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  3. #3
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Location
    Here
    Posts
    3,947
    Thanks
    58
    Thanked 704 Times in 699 Posts
    If you are already using WordPress and are relatively new to web dev by far the easiest option would be to find a ready made plug in that suits your needs

  4. #4
    New Coder
    Join Date
    Sep 2017
    Posts
    41
    Thanks
    5
    Thanked 3 Times in 3 Posts
    What do you mean by downloading it to a visitor? Does the visitor need to download? In that case, just insert the pdf to the page in question. The user will be able to download themselves.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •