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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:23:42+00:00 2026-06-17T20:23:42+00:00

I am trying to create a wizard-like experience with 5 jQuery Dialog modals. I

  • 0

I am trying to create a wizard-like experience with 5 jQuery Dialog modals. I want to fire a new modal from the first one that opens the second, but closes the first. The same with third, the fourth, and the fifth.

I can open the modals nested inside the other modals just fine, but the previous one doesn’t close when the next one opens. In the end, I have 5 windows open on top of each other.

Here is the code I am using to open two of the 5 modals(the rest will go in order using the same logic:

<script>
  $(function() {
   $( "#modal_1" ).dialog({position:['middle',60],
        open: function(event, ui) {  
        dialogClass: 'ui-widget-shadow',
        modal: true,    
        autoOpen: false,
        width: '950px',
        close: function(ev, ui) {$(this).close();}
        });

    $( ".modal_1open" ).click(function() {
      $( "#modal_1" ).dialog( "open" );
        return false;
        });

    $( ".btnNext" ).click(function(){
      $('.ui-dialog-content').dialog( "close" );
        })
    });
</script>
<script>
  $(function() {
   $( "#modal_2" ).dialog({position:['middle',60],
        open: function(event, ui) {  
        dialogClass: 'ui-widget-shadow',
        modal: true,    
        autoOpen: false,
        width: '950px',
        close: function(ev, ui) {$(this).close();}
        });

    $( ".modal_2open" ).click(function() {
      $( "#modal_2" ).dialog( "open" );
        return false;
        });

    $( ".btnNext" ).click(function(){
      $('.ui-dialog-content').dialog( "close" );
        })
    });
</script>

Here is an example of the html:

<a class="button btnNext">Continue</a> <!--this is the button inside the modal that is supposed to fire the next modal-->

<div style="display:none" id="modal_1" title="Login">
  <!--#include file="modal_1.asp"-->
</div>
<div style="display:none;" id="modal_2" title="Page Two Title">
  <!--#include file="modal_2.asp"-->
</div>

I think I can bind the close function with an opening of the next, but I don’t know how. Any help??

  • 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-17T20:23:44+00:00Added an answer on June 17, 2026 at 8:23 pm

    I diet your code to clue and did some test.
    IMO you had missassigned options.
    close: is for event handler, not button.
    Use buttons field for define buttons. when click close your dialog and open next one…

     $(this).dialog("close");
     $("#modal_2").dialog("open");
    

    My simple version below:

    $(function() {
    $("#modal_1").dialog({
        modal: true,
        autoOpen: true,
        buttons: [{text: "Next",click: function() {
                    $(this).dialog("close");
                    $("#modal_2").dialog("open");
                }
            }]
    });
    
    $("#modal_2").dialog({
        modal: true,
        autoOpen: false,
        buttons: [{text: "Next",click: function() {
                    $(this).dialog("close");
                    $("#modal_1").dialog("open");
                }}]
    });
    });
    

    I tested it here:
    http://jsfiddle.net/JmgKS/8/

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

Sidebar

Related Questions

I am trying to create a wizard like structure using dialog boxes...So I replaced
i am trying to use the jquery form wizard with asp.net to create a
Im trying to create an installation wizard for my app. In one of the
I am trying to create a Project Template Wizard. For that I need a
Trying to create a new Dedicated Cache Role in Windows Azure but get the
Trying to create Database as follows: USE Master GO IF NOT EXISTS(SELECT [Name] FROM
Just trying to use MVCWizard.Wizard from NuGet as part of a multipage Wizard UI.
I used the Add-In for Visual Studio wizard to create a new Addin project
I am trying to build a step by step menu (just like a wizard)
I'm trying to generate a new list from a type that is essentially a

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.