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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:33:35+00:00 2026-05-13T23:33:35+00:00

Why doesn’t doesn’t the second jQuery-UI dialog box title change when popped. The first

  • 0

Why doesn’t doesn’t the second jQuery-UI dialog box title change when popped. The first dialog box I change the title of the box with using the following .attr("title", "Confirm") — it change the title of the first box to ‘Confirm’, like it should have. Now when the second box pops up it should change the title to ‘Message’ since did the same thing for the second box — .attr("title", "Message"). Right? But it doesnt. It keep the title from before. However, the message change like it should have. I have tested in IE8, Chrome, and FF3.6.

<div id="dialog-confirm" title=""></div> <– This is the html before jQuery functions.

Javascript / jQuery

$('#userDelete').click(function() {
$(function() {
var dialogIcon = "<span class=\"ui-icon ui-icon-alert\"></span>";
var dialogMessage = dialogIcon + "Are you sure you want to delete?";
$("#dialog-confirm").attr("title", "Confirm").html(dialogMessage).dialog({
    resizable: false,
    height:    125,
    width:     300,
    modal:     true,
    buttons:  {
    'Delete': function() {
        $(this).dialog('close');
        $.post('user_ajax.php', {action: 'delete',
                 aId: $('[name=aId]').val()
        }, function(data) {
            if(data.success){
                var dialogIcon = "<span class=\"ui-icon ui-icon-info\"></span>";
                var dialogMessage = dialogIcon + data.message;
                $('#dialog-confirm').attr("title", "Message");
                $('#dialog-confirm').html(dialogMessage);
                $('#dialog-confirm').dialog({
                    resizable: false,
                    height:    125,
                    width:     300,
                    modal:     true,
                    buttons:  {
                    'Okay': function() {
                        $(this).dialog('close');
                        var url = $_httpaddress + "admin/index.php"
                        $(location).attr('href',url);
                    } // End of Okay Button Function
                    } //--- End of Dialog Button Script
                });//--- End of Dialog Function
            } else {
                $_messageConsole.slideDown();
                $_messageConsole.html(data.message);
            }
        }, 'json');
    }, //--- End of Delete Button Function
    'Cancel': function() {
        $(this).dialog('close');
    } //--- End of Cancel Button Function 
    } //--- End of Dialog Button Script
}); //--- End of Dialog Script
}); //--- End of Dialog Function
return false; 
});

Thank you for you assistant, if you choose to 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-05-13T23:33:36+00:00Added an answer on May 13, 2026 at 11:33 pm

    Without going through all your code. I guess $('#dialog-confirm').attr("title", "Message"); doesn’t work the second time because jQuery UI Dialog already made changes to the actual DOM. So changing the title attribute of the div doesn’t do anything. As the actual title is probably some div/p or similar generated by jQuery UI Dialog.

    Your second call to you $('#dialog-confirm').dialog({..}) simply updates an existing dialog with new options.

    Checking the jQuery UI Dialog documentation you should have noted that you could simply pass in an title option. So the second time instead of

    $('#dialog-confirm').attr("title", "Message");
    $('#dialog-confirm').html(dialogMessage);
    $('#dialog-confirm').dialog({
      resizable: false,
      height:    125,
      width:     300,
      ...
    });
    

    just use

    $('#dialog-confirm').html(dialogMessage);
    $('#dialog-confirm').dialog({
      resizable: false,
      height:    125,
      width:     300,
      ...
      "title", "Message" //NEW!
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Doesn't using Google CDN for jquery break the rule of not using cross domain
Why doesn't the following change the text for me in Android? String content =
Why doesn't this code work? I'am using FF. <head> <script type=text/javascript> document.getElementById(someID).onclick = function(){
This doesn't make sense to me yet. So the first while loop runs and
We're building an app, our first using Rails 3, and we're having to build
Doesn't an ORM usually involve doing something like a select *? If I have
Why doesn't the following doesn't handle the exception that was rethrown? I tried all
Sphinx doesn't generate docs for __init__(self) by default. I have tried the following: ..
Why doesn't the following work? It appears that the literal zero at the end
Why doesn't client validation work? <script src=<%: Url.Content(~/Scripts/jquery-1.4.1.min.js)%> type=text/javascript></script> <script src=<%: Url.Content(~/Scripts/MicrosoftAjax.js)%> type=text/javascript></script> <script

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.