cfwindow
Basic - Auto Open
**************************************************************
tag
**************************************************************
<cfwindow name="win1" title="win1"
source="/railoAjax/tests/cfwindow/files/windowcontentA.cfm" initShow="true"/>
**************************************************************
html
**************************************************************
<button onclick="Railo.Window.show('win1');">Open Win 1
<button onclick="Railo.Window.hide('win1');">Close Win 1
OnBindError
The custom error handler receives ( result status, result text , bind object)
**************************************************************
js
**************************************************************
function customError(x,s,b){
$(document.getElementById(b.bindTo)).html('Error ' + x + ' Message: ' + s);
}
**************************************************************
tag
**************************************************************
<cfwindow
name="error"
title="Error Win"
source="/railoAjax/tests/cfwindow/files/windowcontent.cfm"
onBindError="customError"/>
Binding to elements
Element name also trigger onChange.
**************************************************************
tag
**************************************************************
<cfwindow
name="win2"
title="win2"
source="/railoAjax/tests/cfwindow/files/getname.cfm?name={form:name}&age={form:age@none}"
RefreshOnShow="true"/>
**************************************************************
html
**************************************************************
<form id="form" format="html">
<label>Name</label><input type="text" name="name">
<label>Age</label><input type="text" name="age">
</form>
<button onclick="Railo.Window.show('win2');">Open Win 2
Modal
**************************************************************
tag
**************************************************************
<cfwindow
name="win3"
title="win3"
source="/railoAjax/tests/cfwindow/files/modal.cfm"
modal='true'/>
**************************************************************
html
**************************************************************
<button onclick="Railo.Window.show('win3');">Open Win 3
RefreshOnShow : true
Reload the window content any time window is opened.
<cfwindow name="win4" title="win4" source="/railoAjax/tests/cfwindow/files/windowrefresh.cfm" RefreshOnShow="true"/>
Start and Min Dimensions
<cfwindow name="win5" title="win5" source="/railoAjax/tests/cfwindow/files/windownorefresh.cfm" width="700" height="500" minHeight="400" minWidth="400"/>
No draggable and no resizable.
<cfwindow name="win6" title="win6" draggable="false" resizable="false"> ............................... </cfwindow>
This window cannot be resized and dragged.
This content is the body of the cfwindow tag and is not pulled by ajax.