Jump to content


Firefox does not display data in table

Firefox data display table flexigrid

  • Please log in to reply
4 replies to this topic

#1 Ralf Hundertmark

Ralf Hundertmark

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 07 October 2012 - 10:18 AM

Hi there,

First of all, I would like to say that I really like GroceryCrud and the ease of use.
I mainly develop using firefox, but now I have the weirdest of situation.

I use GrocercyCrud on a simple mySql table (6 fields, 1 orimary index, <200 rows).

The call to the $crud->render function deliveres the wanted reults (I did a print_r on the return value of render and saw all results).

When I echo the result (the putput variable) in my view, it works as expected in Chrome, Safari, Opera and IE !!!, but not if Firefox?!

FF work just great on the ten DB tables I am managing using GC, but this one just does not want to display.

I extract the JS and CSS like this:
<?php foreach($css_files as $file): ?>
<link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
<?php endforeach; ?>

<?php foreach($js_files as $file): ?>
<script src="<?php echo $file; ?>"></script>
<?php endforeach; ?>

When I comment out the the js_files from the rendered result, the table shows, but many other functions are missing.

Did anybody ever encountered that?

Thanks a lot in advance,
Ralf

#2 web-johnny

web-johnny

    grocery CRUD Author

  • Administrators
  • 1,150 posts
  • LocationLondon

Posted 07 October 2012 - 10:27 AM

Hello Ralf Hundertmark and welcome to the forum.

This is really a strange reaction. For my testing environment firefox it is my first priority. It is weird why it doesn't work. Can we have a print-screen of your situation?

Please also make sure that your browser is not a BETA version as I don't have tests for beta versions. So make sure that you have the latest version of firefox (15.0.1)

I think if you give us some code of your method in your controller that will help too.

Cheers
Johnny
Posted Image

#3 Ralf Hundertmark

Ralf Hundertmark

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 07 October 2012 - 10:58 AM

Howowowowow, this is a fast reply. Thank you very much indeed :-)

OK here is the code from teh controller:

public function expenses()
    {
        $crud = new grocery_CRUD();
        if (strlen($this->uri->segment(3)) > 0) {
            $crud->where('Pv_no like "'.$this->uri->segment(3).'%"');
        } // end if

        $crud->order_by('Pv_no');
        $crud->limit(100);
           $crud->set_table('receipts');
        $crud->columns('Pv_no','Date','Description','Amount');
         $crud->callback_column('Amount','_callback_format_float');        
        $crud->set_field_upload('slip_url','assets/uploads/slips');
    
        $data["crud_out"] = $crud->render();

 
         $data["page_class"] = "Budget";
         $data["title"] = "Receipts";
        $data["main_content"] = "budget/budget_expenses";
        $this->load->view('template/template',$data);        
    }

and this is the view:

<?php

    if (isset($page_class)) {

        $myClass = $page_class;

    }

    else {

        $myClass = "default";

    }
    
    foreach($crud_out as $key=>$value) { ${$key} = $value; }
?>




<div id="main_content">

<?php foreach($css_files as $file): ?>
    <link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
<?php endforeach; ?>

<?php foreach($js_files as $file): ?>
    <script src="<?php echo $file; ?>"></script>
<?php endforeach; ?>


    <h1><?php echo( $title); ?> </h1>
    
    <div id="content_pane_type_d" class="shadow">
     <?php echo( $output);  ?>
     <?php  // print_r( $crud_out); ?>
    
    </div>
</div>

This is how the result looks in FF:
https://www.sugarsync.com/pf/D8402138_68926270_963135


and the same in chrome
https://www.sugarsync.com/pf/D8402138_68926270_963123


Thanks so much for your help.

Bast regards,
Ralf

#4 web-johnny

web-johnny

    grocery CRUD Author

  • Administrators
  • 1,150 posts
  • LocationLondon

Posted 07 October 2012 - 11:12 AM

Ok I think I know where the problem could be. Do the below changes and probably you will not have any problem:
1. Move the code:
<?php foreach($css_files as $file): ?>
	 <link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
<?php endforeach; ?>
<?php foreach($js_files as $file): ?>
	 <script src="<?php echo $file; ?>"></script>
<?php endforeach; ?>
to the head tag. It is not only that it is a bad practice but also you will have many instability problems in the future. I think you where just lucky that until now you didn't have other problems with that. Moreover you will see that your pages will load much faster.

2. Clear your cookies and cache to this webpage.
If you have the web developer add-on for firefox just press those three buttons:

2012-10-07_120552.png

In someway you crashed groceryCRUD and the cookies are still there crashing this table. If you just remove the cookies and start again from the beginning it will probably work.
Posted Image

#5 Ralf Hundertmark

Ralf Hundertmark

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 07 October 2012 - 11:20 AM

Dear Jhonny,

Fantastic. That solved it.
Thank you very much indeed.

Cheers,
Ralf





Also tagged with one or more of these keywords: Firefox, data, display, table, flexigrid

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users