Forum


17:37

23/07/2012

Hi , I'm just getting started with this. I can tell the jQuery part is working by alerts, but this code is not yielding a grid. Also, if not path is given to the load URL, that should be in the same dir I take it? What looks wrong? I downloaded the 4.4 grid, as I could not find the latest 4.3 grid.
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ page language="java" import="java.text.DecimalFormat " %>
<%@ page import="com.fins.gt.server.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link rel="stylesheet" type="text/css" media="screen" href="css/ui-lightness/jquery-ui-1.8.21.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="src/css/ui.jqgrid.css" />
<script src="js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="js/jquery-1.7.2.js" type="text/javascript"></script>
<script>
jQuery().ready(function (){
alert("here");
jQuery("#list1").jqGrid({
url:'jsps/iFrames/griddata.jsp',
datatype: "json",
colNames:['vis_id','fname', 'lname', 'vis_date','bldg','requestor_empno','contactName','visitType','visitPurpose'],
colModel:[
{name:'vis_id',index:'vis_id', width:55},
{name:'fname',index:'fname', width:90},
{name:'lname',index:'lname', width:100},
{name:'vis_date',index:'vis_date', width:80, align:"right"},
{name:'bldg',index:'bldg', width:80, align:"right"},
{name:'requestor_empno',index:'requestor_empno', width:80, align:"right"},
{name:'contactName',index:'contactName', width:80, align:"right"},
{name:'visitType',index:'visitType', width:80,align:"right"},
{name:'visitPurpose',index:'visitPurpose', width:150, sortable:false}
],
rowNum:10,
autowidth: true,
rowList:[10,20,30],
pager: jQuery('#pager1'),
sortname: 'id',
viewrecords: true,
sortorder: "desc",
caption:"XML Example"
}).navGrid("#pager1",{edit:false,add:false,del:false});
});
</script>
</head>
<body>
<form name="checkInGrid">
<table id="list2"></table>
<div id="pager2"></div>
</form>
</BODY>
</html>
Most Users Ever Online: 715
Currently Online:
55 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66