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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:36:10+00:00 2026-05-27T19:36:10+00:00

I use jquery ui tabs with conten via Ajax. In content1.html have a dialog

  • 0

I use jquery ui tabs with conten via Ajax. In content1.html have a dialog and a button.
When I select “Ajax tab1”, click “Open” button to open dlg_set_awd dialog, close this dialog, I select another tab, and then select “Ajax tab1” again, click “Open” button there are two dialog opened with the same ID. How can I clear the dialog when I select another tab?

My code below:

Tab file :

</script>
    <link type="text/css" href="../demos.css" rel="stylesheet" />
    <script type="text/javascript">
    $(function() {
        $("#tabs").tabs();
    });
    </script>

HTML :

<div class="demo">
    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">Nunc tincidunt</a></li>
            <li><a href="ajax/content1.html">Ajax Tab 1</a></li>
            <li><a href="ajax/content2.html">Ajax Tab 2</a></li>
        </ul>
        <div id="tabs-1">
            <p>ABC</p>
        </div>
    </div>
</div><!-- End demo -->

content1.html

    <script type="text/javascript">
        $(document).ready(function(){
            $('#dlg_set_awd').dialog({
                autoOpen: false,
                height: 100,
                width: 400,
                modal: true,
                buttons: {
                    'Save': function () {

                    },
                    Cancel: function () {
                        $('#dlg_set_awd').dialog('close');
                    }
                },
                close: function () {
                }
            });

            $('#open').click(function(){
                $('#dlg_set_awd').dialog('open');   
            });
        });
    </script>

HTML :

<form id="form1">
<table id='dlg_set_awd' title="Set ward for participant">
    <tr>
        <td  width="400px" style=" vertical-align:top;">
            <div style="float:left; width:90px; padding-right:11px;">
                <div style="width:90px;" class="id1">First name</div>
                <input type='text' id="first_name" style="width:90px" class="ui-widget-content" />
            </div>
            <div style="width:90px; float:left; padding-right:11px;">
                <div style="width:90px;" class="id1">Last name</div>
                <input type='text' id="last_name" style="width:90px" class="ui-widget-content" />
            </div>
        </td>
    </tr>
</table>
<button id='open' type="button">Open dialog</button>
</form>
  • 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-27T19:36:11+00:00Added an answer on May 27, 2026 at 7:36 pm

    Use this code for binding the click event:

        $('#open').unbind('click.myNameSpace').bind("click.myNameSpace", function() {
            if($('#dlg_set_awd').dialog('isOpen')!='true')
            {
                $('#dlg_set_awd').dialog('open');
            }
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a project that makes heavy use of jQuery tabs and Ajax.
I'd like to use jquery ui tabs plugin, but not have it changing the
I have created a tabbed display with html/css. I simply want to use jQuery
I'm using jQuery UI tabs, loading the tab content via ajax. Content may contain
I have some tabs that I load the content up via ajax. I am
I use jquery for ajax tabs, not jquery UI that is to large for
I have the following jquery code that allows me to use tabs, to tab
JQuery UI let us have tabs loaded dynamically: http://jqueryui.com/demos/tabs/#ajax My question is: if the
The website I am developing uses jQuery UI tabs to load content via AJAX
I have a site where I use jquery ui tabs and in the first

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.