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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:42:10+00:00 2026-05-31T17:42:10+00:00

Im having an issue where the my jquery UI dialog loads multiple times on

  • 0

Im having an issue where the my jquery UI dialog loads multiple times on top of itself:

click -> opens dialog(1 time) -> close dialog
click - > opens dialog(2 times) -> close dialog
click - > opens dialog(4 times) -> close dialog
click - > opens dialog(8 times) -> close dialog

Exactly what is described here: Why does my modal jQuery dialog open multiple times?

I following solution worked for that person but it did not work for me. The solution that worked for that person was to:

1) initialize the dialog outside the function
2) open only on the successful callback from load()

As you can see I do both things in the following code but the problem still persists. Please help:
(Btw the general structure is I load a dialog on the click of a link. Then when the Register button inside that dialog is clicked, I load another small confirmation dialog on top of it with an OK button that closes both dialogs.)

$(document).ready(){
   var $registerDialogHandle = null;
    var $registerStatusDialogHandle = null;

    $registerDialogHandle = $('<div></div>').html("").dialog({
        autoOpen: false, modal: true,  width: 470, height: 552,
        buttons: {
            "Register": function () {
                if ($('#registerForm').validate().form()) {
                    $.ajax({
                        ...ajax settings...
                        success: function () {
                            openInDialog($registerStatusDialogHandle, "/Account/RegisterStatus");
                        }
                    });
                }
            }
        }
    });

    $registerStatusDialogHandle = $('<div></div>').html("").dialog({
        autoOpen: false, modal: true, width: 365, height: 165,
        buttons: {
            "OK": function () {
                $(this).dialog("close");
                $registerDialogHandle.dialog("close");
            }
        }
    });

    $('.registerLink').live("click", function () {
        openInDialog($registerDialogHandle, "/Account/Register?path=_RegisterPartial");
    });
} /*End of document.ready()*/

function openInDialog(dialog, target) {
    var $url = target;
    var $dialog = dialog;
    $dialog.empty();
    $dialog.dialog("option", "position", "center").load($url, function () {
         $dialog.dialog("open");
    });
}
  • 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-31T17:42:12+00:00Added an answer on May 31, 2026 at 5:42 pm

    Seems to work ok here, if I change the .remove() calls to .hide() calls:

    http://jsfiddle.net/jtbowden/s6SxE/

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

Sidebar

Related Questions

I'm having issues with multiple jQuery dialogs. The first one opens fine - is
I'm having an issue with multiple jQuery UI dialogs. What I want is that
Hi I'm having an issue with using jquery overlays failing to close when my
I'm having an issue verifying if a checkbox is checked using jquery on Internet
I'm currently using this jQuery validate plugin and having an issue in IE where
I am having issues with loading external javascript using JQuery. Every time when I
I'm working with forms inside jQuery Dialog, and am having some issues with the
I am having an issue with jQuery templates. I have a simple template each
I'm having an issue using jQuery autocomplete with dynamically created inputs (again created with
I'm having an issue with jQuery UI Tabs script which does not pick up

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.