Hi,
I've done a custom plugin that calls FCKDialogCommand to open a modal with OK/Cancel buttons.
With function OK() there is a code that loads data from php and print then in javascript with FCK.InsertHtml method.
If users open a new browser window and then click this plugin modal's OK button, at the first time, the html is inserted (meaning OK function was called) but the modal don't close, it stays opened. From second time the plugin's modal works fine.
I have no clue why OK function don't close the modal at the first time.
What may be happening?
Thanks,
Carlos
The code:
function Ok() {
sendToPHP();
oEditor.FCKUndo.SaveUndoStep() ;
oEditor.FCK.InsertHtml( top.sHtml ) ;
return true;
}
I've done a custom plugin that calls FCKDialogCommand to open a modal with OK/Cancel buttons.
With function OK() there is a code that loads data from php and print then in javascript with FCK.InsertHtml method.
If users open a new browser window and then click this plugin modal's OK button, at the first time, the html is inserted (meaning OK function was called) but the modal don't close, it stays opened. From second time the plugin's modal works fine.
I have no clue why OK function don't close the modal at the first time.
What may be happening?
Thanks,
Carlos
The code:
function Ok() {
sendToPHP();
oEditor.FCKUndo.SaveUndoStep() ;
oEditor.FCK.InsertHtml( top.sHtml ) ;
return true;
}
Re: OK function don't close the modal at the first time
parent.Close(); //inside Ok()
Re: OK function don't close the modal at the first time