new WebDialog()
Creates the WebDialog
Example
var dialog = new Cocoon.Widget.WebDialog();
Methods
-
<static> close()
-
Closes the dialog.
Example
var dialog = new Cocoon.Widget.WebDialog(); dialog.show("http://www.ludei.com"); //This dialog will close after 15 seconds. setTimeout(function(){ dialog.close(); }, 15000);
-
<static> eval()
-
Evaluates a javascript string in the WebDialog environment.
Example
var dialog = new Cocoon.Widget.WebDialog(); dialog.eval("alert('Michael Jackson is the king of pop')");
-
<static> show(url, closeCallback)
-
Shows the dialog.
Parameters:
Name Type Description url
string The url to be opened on the Web Dialog.
closeCallback
function The callback that will be fired when the dialog is closed.
Example
var dialog = new Cocoon.Widget.WebDialog(); dialog.show("http://www.ludei.com", function(){ console.log("The dialog has been closed!"); });