0 Replies Latest reply on Dec 12, 2013 1:06 PM by LisaN

    CFGRID - Uing Javascript

    LisaN Level 1

      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>