Skip to main content
December 12, 2013
Question

CFGRID - Uing Javascript

  • December 12, 2013
  • 0 replies
  • 496 views

From the grid below, if i click on ID fiel, i got the alert pop up with id number.  In stead of this ID, i want it open the pop up with details.cfm which i already comment out from the js function.  I did not know much about the javascript but when uncomment the code to open for the detail page then i still have it open but not in the pop up, it's open in a seperate page.  Can you help please.

<cfset ajaxOnLoad('addLinksforaTasks')>

<script>

addLinksforaTasks = function() {

   gTask = ColdFusion.Grid.getGridObject('SchedulesGrid');

   gTask.on('cellclick',function(grid,rowIndex,columnIndex,e){

      var assetID =

ColdFusion.getElementValue('SchedulesGrid','SchedulesForm','id_int');

      alert(assetID);

                    //newwindow=window.open('details.cfm','height=200,width=150');

   })

}

</script>

  <cfscript>

  args = {};

  args.bind = "cfc:CFC.schedule.cust({cfgridpage},{cfgridpagesize},

  {cfgridsortcolumn},{cfgridsortdirection})";

  args.delete = TRUE;

  args.format = "html";

  args.insert = false;

  args.name = "SchedulesGrid";

  args.pagesize = "5";

  args.selectmode = "browse";

  args.striperows = TRUE;

  args.autowidth = true;

  args.height = "205";

</cfscript>

<cfform name="SchedulesForm">

  <cfgrid attributecollection="#args#" selectmode="row" colHeaderBold="yes" collapsible="true" title="View Created Profile">

   <cfgridcolumn name="id_int" header="ID" display="no" headerbold="yes" />

    <cfgridcolumn name="name" header="Customer Name" width="108" headerbold="yes" />

  </cfgrid>

</cfform>

    This topic has been closed for replies.