tags:

views:

1793

answers:

2

Hi, I am trying to do kind of a wizard using thickbox, and it works fine when opening it the first time. When I click next I would like to close the div I have opened and open a new one in thickbox, but how is it done? I have tried the following code, but it just closes the thickbox and doesn't open it again:

tb_show("", "#TB_inline?height=280&width=620&inlineId=divStart", "");
tb_remove();
tb_show("", "#TB_inline?height=280&width=620&inlineId=divContinue", "");
A: 

I found the answer myself. I opened a div containing all the steps, and the just through javascript decided what div to show.

Dofs
+1  A: 

You can use this code:

//dont use tb_remove() function

$("#TB_window").remove();
$("body").append("<div id='TB_window'></div>");
tb_show("", "#TB_inline?height=280&width=620&inlineId=divContinue", "");

If you use iframe for loading content:

var p = parent;
p.$("#TB_window").remove();
p.$("body").append("<div id='TB_window'></div>");
p.tb_show("", "#TB_inline?height=280&width=620&inlineId=divContinue", "");
Nam Le