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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:34:26+00:00 2026-05-18T00:34:26+00:00

i have the file 1.html: ….. <script src=/libs/jquery-1.3.1.min.js type=text/javascript></script> <script type=text/javascript> var url0='{$url0}’; var

  • 0

i have the file 1.html:

.....


 <script src="/libs/jquery-1.3.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    var url0='{$url0}';
    var url1='{$url1}';
    var url2='{$url2}';
    var url3='{$url3}';
    var OPEN_ON = false;
    openurls= function(){
    if(confirm('Opens all?') && OPEN_ON == false){
                    OPEN_ON = true;
    $.ajax({<br/>
        type: "POST",
        url: "a1.php",
        data: jsonData,
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(msg) {
            success = true;

        },
        error: function(msg) {

        }
    })

    if(success) { 
     window.open(url0)
     window.open(url1)
    window.open(url2)
    window.open(url3) 
    }


                 setTimeout("location.reload(true);",3000) 

                    OPEN_ON = false
                }
                return false

    }

Question is:
How do I send url0, url1, url2 and url3 to the file a1.php and there after checking some conditions to send them back.enter code here

  • 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-18T00:34:27+00:00Added an answer on May 18, 2026 at 12:34 am

    You just need to put those window.open() calls inside the “success:” callback function.

    Now, once you do that, you’re going to find that the new windows don’t actually open. The browsers are going to block them because they look like aggressive popup ads. Because those window.open calls are happening in a context other than a direct user-initiated event (like a button click), they’ll be blocked. That said, here’s what your “success” function should look like:

    $.ajax({<br/>
        type: "POST",
        url: "a1.php",
        data: { url0: url0, url1: url1, url2: url2, url3: url3 },
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(msg) {
          window.open(url0);
          window.open(url1);
          window.open(url2);
          window.open(url3);
        },
        error: function(msg) {
    
        }
    })
    

    That will “work” as the window.open() calls will be made, but it won’t “work” in that you won’t actually get popups. You have to make it such that user activity (a “click” somewhere) makes the windows open, not an XMLHttpRequest state change.

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

Sidebar

Related Questions

No related questions found

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.