Problem in Grid

QuestionsProblem in Grid
Rakesh asked 10 years ago

hi
i just download your demo
and try it but it display no output on screen
even there are nor error below is my code
<html>
<head>
<link rel="stylesheet" type="text/css" media="screen" href="c:/xampp/htdocs/test/phpgrid/lib/js/themes/redmond/jquery-ui.custom.css"></link>
<link rel="stylesheet" type="text/css" media="screen" href="c:/xampp/htdocs/test/phpgrid/lib/js/jqgrid/css/ui.jqgrid.css"></link>

<script src="c:/xampp/htdocs/test/phpgrid/lib/js/jquery.min.js" type="text/javascript"></script>
<script src="c:/xampp/htdocs/test/phpgrid/lib/js/jqgrid/js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="c:/xampp/htdocs/test/phpgrid/lib/js/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="c:/xampp/htdocs/test/phpgrid/lib/js/themes/jquery-ui.custom.min.js" type="text/javascript"></script>
</head>
<?php // include db config
include("c:/xampp/htdocs/test/phpgrid/config.php");

// set up DB
mysql_connect('localhost','root','');
mysql_select_db(PHPGRID_DBNAME);

// include and create object
include(PHPGRID_LIBPATH."inc/jqgrid_dist.php");
$g = new jqgrid();

// set few params
$grid["caption"] = "Sample Grid";
$grid["autowidth"] = true;
$g->set_options($grid);

// set database table for CRUD operations
$g->table = "login";

// render grid
$out = $g->render("list1");

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;
<body>
<div style="margin:10px">
<?php echo $out?>
</div>
</body>
</html>

2 Answers
Abu Ghufran answered 10 years ago

The html code

<html>
<head>
<link rel="stylesheet" type="text/css" media="screen" href="c:/xampp/htdocs/test/phpgrid/lib/js/themes/redmond/jquery-ui.custom.css"></link>
<link rel="stylesheet" type="text/css" media="screen" href="c:/xampp/htdocs/test/phpgrid/lib/js/jqgrid/css/ui.jqgrid.css"></link>

<script src="c:/xampp/htdocs/test/phpgrid/lib/js/jquery.min.js" type="text/javascript"></script>
<script src="c:/xampp/htdocs/test/phpgrid/lib/js/jqgrid/js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="c:/xampp/htdocs/test/phpgrid/lib/js/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="c:/xampp/htdocs/test/phpgrid/lib/js/themes/jquery-ui.custom.min.js" type="text/javascript"></script>
</head>

Should be placed after doctype.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;
<<<——————- here
<body>

Abu Ghufran answered 10 years ago

Also make sure js / css include file path are correct.
Check fiirebug > net tab for 404 errors.

Your Answer

15 + 5 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?