⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

how to put gc table on iframe



DREON
  • profile picture
  • Member

Posted 28 April 2013 - 08:30 AM

hi to all masters, i have a question on how can i put my gc table on i frame

 

on the Grocery crud examples i have controller

 

function employees_management()
    {
            $crud = new grocery_CRUD();

            $crud->set_theme('datatables');
            $crud->set_table('employees');
            $crud->set_relation('lastName','leave_filed','employee_id');
            $crud->set_subject('Employee');
            $crud->columns('bday','age');
            
            $crud->required_fields('lastName');
            
            $crud->set_field_upload('file_url','assets/uploads/files');
    
            $crud->callback_column('age',array($this,'callback_sick_leave'));
        
    
            
            $output = $crud->render();

            $this->_example_output($output);
    
 
  }

 

 and this is my view

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
<?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; ?>
<style type='text/css'>
body
{
    font-family: Arial;
    font-size: 14px;
}
a {
    color: blue;
    text-decoration: none;
    font-size: 14px;
}
a:hover
{
    text-decoration: underline;
}
</style>
</head>
<body>
    <div>
        <a href='<?php echo site_url('examples/customers_management')?>'>Customers</a> |
        <a href='<?php echo site_url('examples/orders_management')?>'>Orders</a> |
        <a href='<?php echo site_url('examples/products_management')?>'>Products</a> |
        <a href='<?php echo site_url('examples/offices_management')?>'>Offices</a> |
        <a href='<?php echo site_url('examples/employees_management')?>'>Employees</a> |        
        <a href='<?php echo site_url('examples/film_management')?>'>Films</a>
    </div>
    <div style='height:20px;'>
      <?php echo $output; ?>
    
    </div>  



</iframe>
</body>
</html>
 


heruprambadi
  • profile picture
  • Member

Posted 28 April 2013 - 13:05 PM

create another function to call it, and create another view that contain iframe to call your current view.


DREON
  • profile picture
  • Member

Posted 28 April 2013 - 14:22 PM

create another function to call it, and create another view that contain iframe to call your current view.


heruprambadi
  • profile picture
  • Member

Posted 28 April 2013 - 14:37 PM

what is it ? some kind like Retweet ?


DREON
  • profile picture
  • Member

Posted 28 April 2013 - 22:27 PM

no sir sorry im using mobile.. by the way got it thank you..


seth
  • profile picture
  • Member

Posted 30 March 2017 - 05:36 AM

i would like to know how would i possible embed / i frame my grocery to my html page ? please thanks. please give me sample thank you!!!


Amit Shah
  • profile picture
  • Member

Posted 30 March 2017 - 10:58 AM

Hi DREON,

 

Well its a simple stuff u need to look into - 

1. Generate a crud page that shows the desired JS / CSS and the output.. nothing more then that .. no menu or any other substance.

 

2. Create a page with all your menu and other stuff desired / required. There is where u place your IFrame.

 

3. On click of each menu element - instead of setting it a url or opening the same in main window - open the same url inside the iframe.. and there - it should be all ready and set to go with.

 

Happy GCing :)