Cjuidialog Does Not Close The Second Time It's Opened

Hi there,

I’ve got a CJuiDialog with a link inside:




<a id="confirmMissionCancel" class="linkbutton" href="#" onclick="$("#confirm-mission-dialog").dialog("close");">I don't know yet</a>



it works perfectly the first time the dialog is opened but then it doesn’t. Clicking on the “X” always close the dialog though.

Any idea?

Thanks

Renaud

I found it, dialog.close() does not delete the div generated, so the next time another div was created. This fixed it:




<a id="confirmMissionCancel" class="linkbutton" href="#" onclick="$("#confirm-mission-dialog").remove();">I don't know yet</a>