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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:29:01+00:00 2026-05-23T12:29:01+00:00

I have a page with a form. There is an input control I populate

  • 0

I have a page with a form. There is an input control I populate with the parameter email‘s value from the url.

So, when the page is loaded, I automatically submit the form to mail chimp, like this:

 <script type="text/javascript">
        $(document).ready(function () {
            $('#mc-embedded-subscribe-form').submit();
            if ($("#previousUrl").val().indexOf('?') != -1) {
                window.location.replace($("#previousUrl").val() + '&emailRegistered=true#newsletterAnchor');
            }
            else {
                window.location.replace($("#previousUrl").val() + '?emailRegistered=true#newsletterAnchor');
            }
        });
    </script>

and immediately after submit, I do a redirect to previous url.

Well, all this works fine in Firefox (a popup for confirmation is also opened after submitting the form and the main page is redirected back to the previous one.

I do not understand why this does not work in Chrome. I mean, somehow the POST action is not finished, because no other popup is opened (altought this page is redirecting back to the initial one).

Can you suggest me a way to do the redirect when FOR SURE the POST has been done? (in this way I think will work in Chrome too)…

UPDATE:

Form’s target is “_blank” so the script from mail chimp (that’s where I do POST) opens a confirmation popup window.

UPDATE 2:

Tried with ajax but for some reason it does not do anything…

$(document).ready(function () {
            jQuery.ajax({
                url: $('#mc-embedded-subscribe-form').attr('action'),
                data: $('#mc-embedded-subscribe-form').serialize(),
                type: 'POST',
                success: function () {
                    if ($("#previousUrl").val().indexOf('?') != -1) {
                        window.location.replace($("#previousUrl").val() + '&emailRegistered=true#newsletterAnchor');
                    }
                    else {
                        window.location.replace($("#previousUrl").val() + '?emailRegistered=true#newsletterAnchor');
                    }
                }
            });
            return false;
    });
  • 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-05-23T12:29:01+00:00Added an answer on May 23, 2026 at 12:29 pm

    You’re trying to submit a form and redirect to another page at the same time? You can’t do that. You can only make one request at a time (without AJAX, that is).

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

Sidebar

Related Questions

I have a form on an HTML page with multiple submit buttons that perform
I have a simple form on a view page, implemented as a user control,
I have two objects: Form . A form that I populate from a JSP
I have a web page that allows users to insert form input objects with
I have created following function to fill field of a form page, there is
I have a text box. I want to take user input from there and
I currently have a form with a disabled submit input. In firefox 4.0, if
Say I have one full-page form, but within the form, there are two or
I would like to have an aspx page that contains something like.... <form id=form1
I have a form on a page where the user has inputs to edit

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.