77

Possible Duplicate:
jQuery ui dialog change title after load-callback

I like to change the title from an UI Dialog after I have submitted a form in this UI Dialog. So in the callback-function after load I should suggest, but I've tried and googled without result.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Guido Lemmens 2
  • 2,317
  • 5
  • 23
  • 29

2 Answers2

152

The option method will change a dialog's properties after the dialog is created.

Therefore, you can write

$(whatever).dialog('option', 'title', 'New Title');
Betlista
  • 10,327
  • 13
  • 69
  • 110
SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
6

you can also use this, before open it

$("#YourContainer").data('title.dialog', ' I am the new title'); 
Betlista
  • 10,327
  • 13
  • 69
  • 110
Adam Right
  • 955
  • 6
  • 17
  • 35
  • does not work.. var d= $("#dialog"); d.data('title.dialog', ' I am the new title'); d.dialog("open"); – Alvin Oct 23 '12 at 08:53