Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
148
rated 0 times [  154] [ 6]  / answers: 1 / hits: 35027  / 14 Years ago, thu, september 23, 2010, 12:00:00

I have a working dialog, and i want to change the content during the flow of the app, I mean to change the .html() property of the dialog...



I thought it was easy to do but i can't seem to do:



$dialog.dialog().html(SOME CONTENT);



How do I do that after I already have the dialog running?



My init code is:



var $dialog = $('<div></div>')
.html(SplitTable)
.dialog({
autoOpen: false,
height: 500,
width: 600,
title: 'פיצול שולחן'});

$dialog.dialog('open');


where is the ID in that? this is the what i understood i should do from the examples, didn't see any Id property...



p.s. splitTable is the content that i need to change during to program to updatTable...



10x


More From » jquery

 Answers
18

Make sure that the $dialog variable is in scope where you're wanting to change the content, then just a .html() call will work, like this:



$dialog.html(updatTable);


You can see it working here.


[#95523] Tuesday, September 21, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
khalidkendelld

Total Points: 55
Total Questions: 99
Total Answers: 77

Location: South Korea
Member since Tue, Feb 22, 2022
2 Years ago
;