nganu di mu.set ug title akong dialog? mugana ra cya ug mag.set rakog content div, but if sa database mag.gikan ang text para sa content sa div, di makita ang title. baket?

pls help
Code:
$( '#save' ).click( function() {
$( '#dialog' ).dialog( {
buttons: { //set predefined buttons
'Ok': function() {
$( this ).dialog( 'close' );
}
}
} ).attr( 'title', 'Saved title' );
$.post( 'function.php', { ok : '' }, function ( data ) {
$( '#dialog').html( data ); //i tried adding the title here pero same ra japun
} );
} );