Yii Framework Forum: Cjuidialog Does Not Close The Second Time It's Opened - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Cjuidialog Does Not Close The Second Time It's Opened Rate Topic: -----

#1 User is offline   Renaud 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 49
  • Joined: 04-October 11

Posted 19 November 2012 - 04:03 PM

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
0

#2 User is offline   Renaud 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 49
  • Joined: 04-October 11

Posted 20 November 2012 - 04:38 AM

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>

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users