I am working with dhtmlmodal window code (from http://www.dynamicdrive.com/dynamici...dhtmlmodal.htm) in an application. The application starts out with a modal pop up that gives the user three options of performing reassigning and skipping, if they choose to reassign or skip the modal will perform some back-end actions and close. however, when the user click perform what I believe I have written the code to do is open another modal window and that holds the meat of the application. however, instead of opening the window it just appends the new window into the current window without any of the retrieved data. Does anyone have an idea how to work around this?

I have tried close the first and opening the second and even reassigning the content of the parent modal to display the new page.

I should also mention the the content of the first window and the second window are two separate jsp files.

the gist code for opening the window is below:

Code:
popup1 = dhtmlmodal.open('box1','iframe', .....);

//then inside the jsp this popup is displaying; i call this

popup2 = a_dhtmlmodal.open('box2','iframe',.....);

//I copied and renamed the modal and widow objects to prevent them from interfering with each other and other application running for the second window
As you can kind of see i use separate iframe id's; separate variables; and i made copies so i am reference two different modal objects.