troubleshooting Question

Open Cfwindow when clicking on CFGRID row

Avatar of rrattie
rrattieFlag for United States of America asked on
ColdFusion LanguageAdobe DreamweaverJavaScriptProgramming
18 Comments2 Solutions2055 ViewsLast Modified:
I have a CFGRID that displays an employee phone directory on a company intranet.
I want the user to be able to click on a row showing an employee's name and number, when clicking on the row a window will appear and show  the user the details of the employee that they clicked on.

I am not getting any errors at the moment with my current code, but alas I'm not getting any response from the page at all when I click on a row. The row is highlighted, but no window appears.

I have searched and found a few different methods on EE and the web in general, but nothing is working for me at the moment. It is entirely possible that I am overlooking or forgetting something.
<script type="text/javascript">
function init()
		grid = ColdFusion.Grid.getGridObject("employees");
		function emplisten(grid,rowIndex,e)
			var record = grid.getDataSource().getAt(rowIndex); // Get the Record
			var varEmployeeID =;
			var resID =;
							   ColdFusion.Window.create("mywin"+resID,"Employee Detail","employee_directory/employee_detail_public.cfm?EmployeeID="+varEmployeeID,
			// Stops the browser context menu from showing. e.stopEvent();
			// show menu at contextMenu.showAt(e.xy);
			function onhide(name) 


<div style="text-align:center; width:609px; border:solid 1px #999999; margin: 0; padding-top:5px; padding-bottom:5px;">                         
<label for="column">Search the directory by:&nbsp;<cfselect id="column" name="column" style="border:solid 1px ##999999;" >
                        <option value="">select a column</option>
                        <option value="Personnel">Full Name</option>
                        <option value="Last_Name">Last Name</option>
                        <option value="First_Name">First Name</option>
                        <option value="Phone">Phone Number</option>
                        <option value="Branch">Branch</option>
                        <option value="BLDG">Building</option>
<cfinput type="text" id="filter" name="filter" maxlength="30" style="border:solid 1px ##999999;" tabindex="1" >
<cfinput type="button" name="search" value="Search" id="search" class="btn"> 

    <cfgrid name="employees"
                                        )" autoWidth="yes" collapsible="false"  title="Employee Directory" colheaderbold="yes"  selectcolor="##D5EDB3" selectonload="false" >
        <cfgridcolumn name="ID" display="no"/>
        <cfgridcolumn name="Personnel" header="Full Name" width="150" />
        <cfgridcolumn name="Last_Name" header="Last Name" width="120" />
        <cfgridcolumn name="First_Name" header="First Name" width="100" />
       <cfgridcolumn name="Phone" header="Phone" width="100"/>
  <cfgridcolumn name="Branch" header="Branch" width="70"/>
  <cfgridcolumn name="BLDG" header="BLDG" width="70"/>

<cfset ajaxOnLoad("init")>
Pravin Asar
Principal Systems Engineer
Join our community to see this answer!
Unlock 2 Answers and 18 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 18 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros