Error Pops Up

QuestionsError Pops Up
Fran T asked 12 years ago

Errors box pops up with simple phpgrid code since this is my first use. The error box only states error and then lists the data from the database at the bottom of the box in red.

4 Answers
Abu Ghufran answered 12 years ago

Hi

This usually happens when there is a white spaces before the grid->render() function. it must be called before any thing is sent to output. The output of ajax call must be json without spaces. check faq for more.

Fran T answered 12 years ago

Abu,
Can you explain? Where should I be looking for white spaces?

Also my page is set up as such

include('header.php');

sample phpgrid code from site with my info

include('footer.php');

The grid comes up on the page with the proper column titles from the database but then the error window pops up.

Thanks

Abu Ghufran answered 12 years ago

Grid code consist of 2 parts.

1) PHP Side

include("inc/jqgrid_dist.php");
$g = new jqgrid();
…..
$out = $g->render("list1");

2) HTML Side

<div style="margin:10px">
<?php echo $phpgrid_output?>
</div>

Now the PHP side code must be plugged before any header output or html. You can place 2nd part where you wish to display grid.

Fran T answered 12 years ago

Abu,
Thanks ill try the php code ahead of the header code and let you know.

Your Answer

8 + 1 =

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?