Last active
December 28, 2015 21:49
-
-
Save nickarthur/7567636 to your computer and use it in GitHub Desktop.
HTML DIALOG CUSTOM CLOSE BUTTON
cloudparty CLOUDPARTY
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var htmlText = '<div id="body">\ | |
<div id=btnGrp>\ | |
<button id="btnClose">Close the Dialog</button><br>\ | |
</div></div>'; | |
function clickStart() { | |
controllerHTMLCreate({ | |
ent: getMessageEnt(), | |
title: 'the winow title', | |
html: htmlText, | |
listeners: [ | |
{id: 'btnClose', message:'close', command:'close'} | |
], | |
messagers: [ | |
{id:'btnClose', message:'close'}] | |
}); | |
} | |
handlerCreate({ | |
name: 'clickStart', | |
channel: 'direct', | |
message: 'clickStart' | |
}); | |
handlerCreate({ | |
name: 'closeClick', | |
channel: 'controller', | |
message: 'close' | |
});var htmlText = '<div id="body">\ | |
<div id=btnGrp>\ | |
<button id="btnClose">Close the Dialog</button><br>\ | |
</div></div>'; | |
function clickStart() { | |
controllerHTMLCreate({ | |
ent: getMessageEnt(), | |
title: 'the winow title', | |
html: htmlText, | |
listeners: [ | |
{id: 'btnClose', message:'close', command:'close'} | |
], | |
messagers: [ | |
{id:'btnClose', message:'close'}] | |
}); | |
} | |
handlerCreate({ | |
name: 'clickStart', | |
channel: 'direct', | |
message: 'clickStart' | |
}); | |
handlerCreate({ | |
name: 'closeClick', | |
channel: 'controller', | |
message: 'close' | |
}); | |
function closeClick() { | |
say('Close clicked. Attempting to Close Dialog'); | |
//send the controller message to close the window | |
controllerMessage({ent: getMessageEnt(), message: 'close', text: 'close'}); | |
} | |
function closeClick() { | |
say('Close clicked. Attempting to Close Dialog'); | |
//send the controller message to close the window | |
controllerMessage({ent: getMessageEnt(), message: 'close', text: 'close'}); | |
}var htmlText = '<div id="body">\ | |
<div id=btnGrp>\ | |
<button id="btnClose">Close the Dialog</button><br>\ | |
</div></div>'; | |
function clickStart() { | |
controllerHTMLCreate({ | |
ent: getMessageEnt(), | |
title: 'the winow title', | |
html: htmlText, | |
listeners: [ | |
{id: 'btnClose', message:'close', command:'close'} | |
], | |
messagers: [ | |
{id:'btnClose', message:'close'}] | |
}); | |
} | |
handlerCreate({ | |
name: 'clickStart', | |
channel: 'direct', | |
message: 'clickStart' | |
}); | |
handlerCreate({ | |
name: 'closeClick', | |
channel: 'controller', | |
message: 'close' | |
}); | |
function closeClick() { | |
say('Close clicked. Attempting to Close Dialog'); | |
//send the controller message to close the window | |
controllerMessage({ent: getMessageEnt(), message: 'close', text: 'close'}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This gist shows how to setup a close button in a cloudparty html controller