Welcome Guest, Not a member yet? Register   Sign In
problem setting base url
#11

[eluser]Bas Vermeulen[/eluser]
Change it to:

Code:
<Directory "c:/wamp/apache2/cgi-bin">
    Options All
    AllowOverride All
</Directory>

And make sure you restart apache after this update.
#12

[eluser]UdayD[/eluser]
I did the same as said but still its not solved
again page not found error
#13

[eluser]Bas Vermeulen[/eluser]
Ow lol, this might fix it, update .htaccess with:

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /CI/index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
    ErrorDocument 404 /CI/index.php
</IfModule>
#14

[eluser]UdayD[/eluser]
still having same problem

following code is for controller

Code:
&lt;? class My_data_page extends Controller{
    function My_data_page(){
       parent::Controller();
       $this->load->helper('url');
       $this->load->library('table');
       $this->load->helper('html');
       $this->load->library('Ajax_pagination');
       $this->load->Model('data');
    }
    function index(){
        
        $data['makeColumns'] = $this->makeColumns();
        $data['getTotalData'] = $this->data->getTotalData();
        $data['perPage'] = $this->perPage();
        $this->load->view('my_data_page', $data);
        
    }
    //Pull 'name' field records from table 'contact'
    
    function perPage(){
         return 10; //define total records per page
      }
    
    //Generate table from array
    function makeColumns(){
            if(isset($_POST['page']))
                 $page=$_POST['page'];
            else
                $page=0;
         $peoples = $this->data->getData($page,10);
               //print_r($peoples[1]->countries_name);
           //exit();
          $counter=count($peoples);
          for($i=0;$i<$counter;$i++)
          {
          $data[]="<div class='mylink'>countries_id.")' style='color:#ff0000;cursor:pointer'>".$peoples[$i]->countries_name."</div>";
          }
         return  $this->table->make_columns($data, 1);
    }
}
?&gt;
following for view

Code:
[removed][removed]
[removed][removed]
[removed]
$(function(){
$('.mylink').click(function(){
$.fn.getDetails=$.fn.(function(myid){
        alert($(this).attr('id'));
});
});
});

[removed]
<div id="content">
&lt;?
$config['first_link'] = 'First';
$config['div'] = 'content'; //Div tag id
$config['base_url'] = 'my_data_page';
$config['total_rows'] = $getTotalData;
$config['per_page'] = 10;
$config['postVar'] = 'page';

$this->ajax_pagination->initialize($config);
//PRINT TABLE
print $this->table->generate($makeColumns);
print $this->ajax_pagination->create_links();

?&gt;
</div>

is anything wrong over here
#15

[eluser]UdayD[/eluser]
ok solved the problem with same as aboce just changed the directory name as mine.
thanks Bas Vermeulen for ur help
#16

[eluser]Bas Vermeulen[/eluser]
ah I figured CI was your directory because the URL in your first post was http://localhost/CI/my_data_page

You're welcome, glad it works now!




Theme © iAndrew 2016 - Forum software by © MyBB