hi got a problem on ui dialog postion. Im new to jquery and js. Need help.

hi got a problem on ui dialog postion. Im new to jquery and js. Need help.

hi 

i have 2 dialogbox, the first will popout giving a 3 buttons for the user to use (chat, message, view camera), when the user click the message button the dialog box will close and  a new  dialog box will appear containing the message module.  I set the first dialog box with a postion [x, y];

My problem is when the message dialog box appear it will set to position assigned on the first dialog even thou i set the position of the 2nd dialog box to center. 

hope someone can help me, I'm sure all of you are good on this.

Thanks!!