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

  • Home
  • SEARCH
  • 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 787389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:11:34+00:00 2026-05-14T21:11:34+00:00

to show my problem in a couple examples… THIS WORKS $.post(SomePage.aspx, { name :

  • 0

to show my problem in a couple examples…

THIS WORKS

$.post("SomePage.aspx", { name : "value" },
      function (data) {
         alert(data);
      }, "text");

THIS DOESN’T WORK

$.post("SomePage.aspx", { name : "value" },
          function (data) {
             window.open("http://www.google.com");
          }, "text");

In the first example, I get alerted with what i’m expecting. In the second example, nothing happens. No window is opened. If I add an alert or something before or after the window.open call, the alert works fine, but the window doesn’t open. If I add a window.open completly after the $.post method, the window opens fine (of course this doens’t help me at all).

I’m wondering why I can’t open a window in the callback. What do I have to do to be able to open a window? I’d like to open a window to show some fancy results.

Any help is appreciated, thanks.

  • 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-14T21:11:35+00:00Added an answer on May 14, 2026 at 9:11 pm

    should work?

    try it with the name of the window?

    window.open("http://www.google.com", "MyWindow");
    

    according to this post

    http://www.javascript-coder.com/window-popup/javascript-window-open.phtml

    The syntax of the window.open method
    is given below: open (URL,
    windowName[, windowFeatures])

    the 2nd parameter is not optional (of course, everything is optional in javascript), maybe something weird happens in the callback without it?

    also, possible it is opening in a new tab or behind the current window?

    var x = window.open("http://www.google.com", "MyWindow");
    x.focus();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

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.