We are having an issue where an image tag loaded via JSON is not clickable in IE (FF it is fine). If I click in the cell on empty area the click is registered.
I added a an alert to check. Thanks
Kevin
The JSON looks like this (just first record)
|
1 |
{"ROWS":[[1179,"AA, BB","ABBY34@testme.com","","","<img src=\"\/includes\/images\/buttons\/ico_edit.gif<br />\" style=\"border: medium none ;\" alt=\"edit record\" \/>"]<br /><br />jqGrid <br /><br />$("#list").jqGrid(<br /> {<br /> url:'/model/administration.cfc?method=getUsers', //CFC that will return the users<br /> datatype: 'json', //We specify that the datatype we will be using will be JSON<br /> colNames:['ID','Fullname','Username','Office Location','Staff Type','det'], //Column Names<br /> /*<br /> The Column Model to define the data. Note you can make columns non sortable, specify width, alignment, etc.<br /> We also specify the editoptions, edittype=text shows a nice textbox for inline edit. <br /> We have also specified Edit Rules, to say which fields are required/not required for add/edit<br /> */<br /> colModel :[<br /> {name:'id',index:'id',sorttype:"int", hidden:true},<br /> {name:'fullname',index:'fullname', width:250,align:"left",sorttype:"text"},<br /> {name:'username',index:'username', width:250,align:"left",sorttype:"text"},<br /> {name:'officelocation',index:'officelocation', width:180,align:"left",sorttype:"text"},<br /> {name:'stafftype',index:'stafftype', width:180,align:"left",sorttype:"text"},<br /> {name:'userdetail',index:'userdetail', width:50,sortable:false}<br /> ], <br /> pager: $('#pager'), //The div we have specified, tells jqGrid where to put the pager<br /> rowNum:20, //Number of records we want to show per page<br /> rowList:[10,20,30,50], //Row List, to allow user to select how many rows they want to see per page<br /> sortorder: "asc", //Default sort order<br /> sortname: "lastname", //Default sort column<br /> postData: {usertype: 'internal'},<br /> viewrecords: true, //Shows the nice message on the pager<br /> imgpath: '/includes/js/jqGrid_themes/basic/images', //Image path for prev/next etc images<br /> //caption: 'Users', //Grid Name<br /> height:'auto', //I like auto, so there is no blank space between. Using a fixed height can mean either a scrollbar or a blank space before the pager<br /> mtype:'GET',<br /> cellEdit: false,<br /> recordtext:'Total Records', //On the demo you will notice "7 Total Records" - The Total Reocrds text comes from here<br /> //pgtext:' of', //You notice the 1/3, you can change the /. You can make it say 1 of 3<br /> //editurl:"/model/administration.cfc?method=addeditUser", //The Add/Edit function call<br /> //toolbar:[true,"top"], //Shows the toolbar at the top. We will use it to display user feedback <br /> //Things to do when grid is finished loading<br /> loadComplete:function(){<br /> //We get the Userdata for the grid.<br /> var recorddata = $("#list").getUserData();<br /> //show the msg in the toolbar<br /> $("#t_list").html(recorddata.MSG);<br /> },<br /> onCellSelect: function(rowid, iCol, cellcontent) {<br /> alert(iCol); // this is a test for click<br /> if (iCol == 5 || iCol == 4 ) {<br /> //alert(rowid + ":" + iCol +":"+ cellcontent);<br /> var ret = jQuery("#list").getRowData(rowid); //alert("id="+ret.id+" invdate="+ret.username+"..."); <br /> $.nyroModalManual({<br /> url: 'index.cfm?event=ehAdmin.dspInternalUserEdit',<br /> ajax: {data: 'userId='+ret.id+'&username='+ret.username+'&fullname='+ret.fullname, type: 'POST'},<br /> type: 'form',<br /> modal: false,<br /> bgColor: '#666666',<br /> width: 680,<br /> height: 410,<br /> minWidth: 680, // Minimum width<strong></strong><br /> minHeight: 410, // Minimum height<br /> //resizeable: true, // Indicate if the content is resizable. Will be set to false for swf<br /> autoSizable: true,<br /> closeButton: '<a href="#" class="nyroModalClose" id="closeBut" title="close" rel="nofollow">Close</a>'<br /> });<br /> return false;<br /> }<br /> },<br /> //The JSON reader. This defines what the JSON data returned from the CFC should look like<br /> jsonReader: {<br /> root: "ROWS", //our data<br /> page: "PAGE", //current page<br /> total: "TOTAL", //total pages<br /> records:"RECORDS", //total records<br /> userdata:"USERDATA", //Userdata we will pass back for feedback<br /> cell: "", //Not Used<br /> id: "0" //Will default to frist column<br /> }<br /> }<br /><br />Sample of table render<br /><br /><tr id="1179" class="jqgrow"><br /> <td title="1179" style="display: none;">1179</td><br /> <td title="AA, BB" style="text-align: left;">AA, BB</td><br /> <td title="ABBY34@testme.com" style="text-align: left;">ABBY34@testne.com</td><br /> <td title="</tr> |
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top