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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:37:27+00:00 2026-05-14T14:37:27+00:00

I have the following code: <div id=DivPassword title=test > I want to change the

  • 0

I have the following code:

<div id="DivPassword" title="test" > 

I want to change the div title and I have the following code:

 function ChangeAttribute() {
         $("#DivPassword")
            .attr('title', 'Photo by Kelly Clark');
         $('#DivPassword').dialog('open');
         return false;
     }

When the dialog is opened, the title is still test! if I don’t assign any title to the div, the dialog doesn’t show any title. How can I correct that?


 function ChangeAttribute() {
         $("#DivPassword")
            .attr('title', 'Photo by Kelly Clark')
            .dialog('open');

         alert($("#DivPassword").attr('title'));
     }

$('#DivPassword').dialog({
             autoOpen: false,
             width: 800,
             buttons: {
                 "Cancel": function() {
                     $(this).dialog("close");
                 },
                 "Accept": function() {
                 alert($(this).attr('title'));
                     $(this).dialog("close");
                 }
             }
         });

 <script type="text/javascript">
     var Dtitle;
     $(function() {
        $('#DivPassword').dialog({

             autoOpen: false,
             width: 800,
             title : Dtitle,
             buttons: {
                 "Cancel": function() {
                     $(this).dialog("close");
                 },
                 "Accept": function() {
                     $(this).dialog("close");
                 }
             }
         });
     });

     function ChangeAttribute(name) {
         $("#DivPassword")
            .attr('title', name)
            .dialog('open');
         Dtitle = $("#DivPassword").attr('title');
         alert(Dtitle);
     }


</script>
  • 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-14T14:37:28+00:00Added an answer on May 14, 2026 at 2:37 pm

    Thanks for all the answers.

    The $('#DivPassword').dialog({ had to be after .dialog('open');

    The simplest way was to do as follows:

     $("#DivPassword")
                .dialog('open');
             $('#DivPassword').dialog({
                 autoOpen: false,
                 title: $('#DivPassword').attr('title') + name,
                 width: 400,
                 buttons: {
                     "Cancel": function() {
                         $(this).dialog("close");
                     },
                     "Accept": function() {
                         $(this).dialog("close");
                     }
                 }
             });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code function exibirDialog(div) { $(#divDialogo).ready(function() { $(#divDialogo).dialog({ open: function() {
I have following code: <div class='parent'> <div class='left-child'></div> <div class=right-child></div> </div> What I want
I have following code in my Wordpress: (function ($) { var $header = $(div.header);
I have the following code : $('div[class^=locked_]').click(function() { var newThis = $(this) ; $(this).load(url
I have the following code so far: $('div.welcome-handle').click(function() { top.$('#welcome-message').toggle(function() { $(this).animate({left: -=749px}, 500);
I have following code in html: <div> <div style=float:left;margin:0.5em> <span class=title>Label1</span><br/> <input type=text name=name1
I have the following code: <div class='menu'> <div class='menu_1'> <a href='../test.php'>JOBS</a> </div> <div class='menu_2'>
I have the following code: alert($(div, data).attr(style.background)); I would like to select the colour
I have following code: <div class='no_translate'>Not translated</div> And following code for mouseover/mouseout events: $('.no_translate').mouseover(function()
I have the following code: $(document).ready(function () { $('div.env').each(function (index, item) { var vm

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.