Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Jim Ward / Jim Ward (Jim Ward)
Created: 07/22/2014
Components: AJAX
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final / 11.0 U3
Priority/Frequency: Major / All users will encounter
Locale/System: English / Win 2008 Server R2 64 bit
Vote Count: 0
Duplicate ID: CF-3697683
Problem Description: When trying to use any ColdFusion.grid related function in a function that is called by ajaxOnLoad, the grid object is not available. This worked in Coldfusion 10.
Steps to Reproduce: Here is the code to reproduce:
<html>
<head>
<script type="text/javascript">
var aproxy;
var tb;
var grid;
function initPage()
{
Ext.QuickTips.init();
grid = ColdFusion.Grid.getGridObject('testGrid');
grid.on('mouseover', mouseOver);
//tb = ColdFusion.Grid.getTopToolbar("openSolicitations");
//tb.add({text:"Open Solicitations"});
}
function mouseOver() {
}
</script>
</head>
<body>
<cfoutput>
<cfform id="testForm">
<div id="stylized">
<div class="mybody" style="margin-bottom:10px;">
<h3>Test page
</h3>
</div></div>
<cfgrid name="testGrid"
format="html" rowheight="100" title="Test Grid"
colheaderalign="left" align="middle" >
<cfgridcolumn name="PERSON_ID" header="Name" width="150" dataalign="left"/>
<cfgridcolumn name="LAST_NAME" header="Description" width="450"/>
<cfgridcolumn name="FIRST_NAME" header="Open Date" width="110"/>
</cfgrid>
</cfform>
</cfoutput>
<button onClick="initPage()">Test</button>
<cfset ajaxOnLoad("initPage")/>
</body>
</html>
Actual Result: Javascript error: TypeError: grid is undefined
Expected Result: Grid object should be available at this point.
Any Workarounds: Stay at Coldfusion 10.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3793029
External Customer Info:
External Company:
External Customer Name: Yodeler
External Customer Email:
External Test Config: My Hardware and Environment details: Windows server 2008 R2 64 bit. IIS 7.5.
Attachments:
Comments: