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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:49:23+00:00 2026-06-07T16:49:23+00:00

I have a jQuery UI dialog: $(#dialog).dialog({ modal: true, closeOnEscape: false, resizable: false, autoOpen:

  • 0

I have a jQuery UI dialog:

$("#dialog").dialog({
    modal: true,
    closeOnEscape: false,
    resizable: false,
    autoOpen: false,
    open: function() {
        $(".ui-dialog-titlebar").hide();
    }
});

I am trying to open this dialog just before an AJAX call. It works using Firefox, but with IE it doesn’t open, unless I put an alert, just after I open the dialog. Can anyone tell me what the problem might be please? I am using the following code:

$("button").click(function() {
    $("#dialog").dialog('open');
    //alert('test'); //if I put this alert, the dialog will open
    $.ajax({
        type: "POST",
        url: "testing.txt",
        async: false,
        dataType: "text",
        success: function(returnText) {
            $("#dialog").dialog('close');
            $("#textarea").text(returnText);
        },
        error: function() {
            $("#dialog").dialog('close');
        }
    });
});
  • 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-07T16:49:24+00:00Added an answer on June 7, 2026 at 4:49 pm

    The open event completes asynchronously due to potential animations, therefore what is likely happening is that due to IE’s slow JavaScript interpretation, the code to close the dialog in the success or error callbacks (which are also asynchronous) are executing close enough to the open that you don’t notice dialog ever being opened. I’m going to guess that your AJAX call is completing very quickly.

    One way around this it to put your AJAX call in a setTimeout block.

    $("button").click(function() {
        $("#dialog").dialog('open');
    
        setTimeout(function() {
            $.ajax({
                type: "POST",
                url: "testing.txt",
                async: false,
                dataType: "text",
                success: function(returnText) {
                    $("#dialog").dialog('close');
                    $("#textarea").text(returnText);
                },
                error: function() {
                    $("#dialog").dialog('close');
                }
            });
        }, 1);
    });
    

    This will simply queue up the $.ajax call which will allow the open event to complete. John Resig has a nice write up on why this sort of thing works here – http://ejohn.org/blog/how-javascript-timers-work/.

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

Sidebar

Related Questions

I have this definition for the jquery dialog plugin: $(#DonateForm).dialog({ modal: true, autoOpen: false,
This is my document.ready code: $(document).ready(function() { $(#dialogbox).dialog({ open: function(event, ui) {$(a.ui-dialog-titlebar-close).remove();}, bgiframe: true,autoOpen:
I have a jQuery dialog form: $loading.dialog({ closeOnEscape: false, resizable: false, draggable: false, width:
Hi have a jquery dialog: the js source is: $(document).ready(function() { $(#DialogConfirmationDiv).dialog({ bgiframe: true,
Good morning. I have a modal JQuery dialog that on Open calls and loads
I have a jquery modal dialog, and I am trying to change the text
I have a jquery modal dialog that displays a partial view. The partial view
I have a modal dialog plugin written in jquery, that binds to the click
I have a problem with Jquery UI modal dialogs. I have modal dialog (dialogA),
I have a jQuery modal dialog with an iFrame in it that shows some

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.