Simple question: dialog title
I have the following codes but I can see that the dialog title not being set. How can I change the title of the dialog box. The alerts clearly shows that the title are the new values passed. Only they are not being displayed as the title in the dialog box. How can I make it work?
- <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>
-
<
div id="DivPassword" title="Change password for"> </div>