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 7755403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:33:36+00:00 2026-06-01T12:33:36+00:00

EDIT: This privately published page is what I need to work with. Password: stackOF

  • 0

EDIT: This privately published page is what I need to work with. Password: stackOF

My client desires is to have her WordPress blog show a MailChimp form on her home page as a gateway to a .pdf. I need the following behavior to occur when the user clicks “Submit”:

  1. execute the included MailChimp’s javascript file; this ensures the form was properly filled, and then performs the sign-up to the newsletter list (don’t need help with this part)
  2. then show the user an informational PDF for download or viewing
    EDIT: The logical order was flipped from when I originally posted this. The script should execute, and only if the script gets executed properly should the PDF show to the user

Note:

  • My experience level with HTML and PHP is 3/4, and with JS I am 2/4 EDIT: (seems more like 1/4 at this point lol). If my research is correct, PHP (server-side language) would be used to do that which the client wants.
  • Additional validation is not necessary beyond what MailChimp’s script provides (it ensures that user has submitted a completed form) in this case (the client says it’s ok if the e-mail isn’t valid at all).
  • The .pdf URL and content is static, and simply needs to be shown, not generated.

—-RESEARCH—-
I know that the Mailchimp form uses the following line to actually submit the information, but I want to do the action mentioned below, as well as open the aforementioned .pdf:

<form action="http://*BLAH*.us2.list-manage.com/subscribe/post?u=*BLAHBLAH*&amp;id=*BLAHBLAHBLAH*" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">

I am reading on other sites that I can conceivably point “action” to a .php file, but if there is a way to do this with javascript – since its using the .js file that I created for that already anyways, then I would be most happy. Barring that, I’ll take what I can get..

  • 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. Editorial Team
    Editorial Team
    2026-06-01T12:33:37+00:00Added an answer on June 1, 2026 at 12:33 pm

    You can try the following:

    add an onsubmit handler on the mailchimp form like below:

    <form onsubmit="runMyStuff(this)" action="http://*BLAH*.us2.list-manage.com/subscribe/post?u=*BLAHBLAH*&amp;id=*BLAHBLAHBLAH*" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
    

    Your javascript function:

    function runMyStuff( o ) {
        // open the pdf file in a separate window
        window.open( PATH_TO_YOUR_PDF_URL );
    
       // now, submit the form
       o.submit();
    }
    

    Hope this helps.

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

Sidebar

Related Questions

EDIT: This question was initially too general, I think. So What I really need
Edit: This is done in the Compact Framework, I don't have access to WebClient
I have this Database, not of my design but I have to work with
EDIT: This is solved now but I don't have enough rep to answer it
EDIT: This post was originally specific to ASP.NET, but after thinking about it I'm
Edit This question has gone through a few iterations by now, so feel free
EDIT: This question is a duplicate of What is the difference between managed and
EDIT: This issue is already submitted on Github. Changing the Act part to this
[Edit: This problem applies only to 32-bit systems. If your computer, your OS and
EDIT: This problem has been solved. See below. Hey all. I'm building an iPhone

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.