Forum


23:11

31/01/2012

I began with the example at /jqgridwiki/doku.php?id=wiki:first_grid, and made trivial changes to make it fit with what I need to do. Note, the accordion I am using in the same file is working perfectly.
It was easy enough to understand, but, for some reason, the HTML page is either not finding my perl script or not executing it.
I have verified that all the required css and js files are found.
NB: I am running Apache's httpd server, and the html file is in htdocs while my perl script is in cgi-bin.
Here is my HTML file:
<html>
<head><title>Test Grid</title>
<meta http-equiv="X-UA-Compatible" content="ie=9">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link type="text/css" href="/css/themes/redmond/jquery-ui-1.8.16.custom.css" rel="Stylesheet" />
<link rel="stylesheet" type="text/css" media="screen" href="/css/ui.jqgrid.css" />
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="jquery-ui-1.8.16.custom.min.js"></script>
<script src="grid.locale-en.js" type="text/javascript"></script>
<script src="jquery.jqGrid.min.js" type="text/javascript"></script>
<script>
$(function() {
$( "#accordion" ).accordion({fillSpace: true});
});
$(function() {
$( "#accordionResizer" ).resizable({
minHeight: 140,
resize: function() {
$( "#accordion" ).accordion( "resize" );
}
});
});
$(function(){
$("userlist").jqGrid({
url:'/cgi-bin/users.pl',
datatype: 'xml',
mtype: 'GET',
colNames:['First name','Last name','Email address','User name','Password'],
colModel :[
{name:'fname', index:'first_name'},
{name:'lname', index:'last_name'},
{name:'email', index:'email_address'},
{name:'username', index:'username'},
{name:'password', index:'password'}
],
pager: '#userpager',
rowNum: 10,
sortname: 'lname',
sortorder: 'acs',
viewrecords: true,
gridview: true,
caption: 'Users'
});
});
</script>
</head>
<body style="font-family:Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em;">
<div id="accordion" style="height:100%;width:100%">
<h3><a href="#g1">Users</a></h3>
<div id="g1" style="height:100%;width:100%">
<p> a grid goes here</p>
<table id="userlist"><tr><td/></tr></table>
<div id="userpager"></div>
</div>
<h3><a href="#g2">Grid 2</a></h3>
<div id="g2" style="height:100%;width:100%">
<p> another grid goes here</p>
</div>
<h3><a href="#g3">Grid 3</a></h3>
<div id="g3" style="height:100%;width:100%">
<p> another grid goes here</p>
</div>
</div></body>
</html>
I know there is no attempt to run my perl script as I have it writing data, such as the SQL to get the data, and the XML it is to produce, to text files. I can post that perl script too, if it would help.
It would be really good if I can get help over this particular hurdle so I can create forms on my web page that use the grid for in place editing.
Any insights would be greatly appreciated.
Thanks
Ted
Most Users Ever Online: 715
Currently Online:
61 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