Part of the EllisLab Network
   
 
Ajax and CI
Posted: 03 July 2010 05:13 AM   [ Ignore ]  
Lab Assistant
RankRank
Total Posts:  113
Joined  08-24-2009

Hy,
When I perform ajax on view where there is only html or php there is no problem
But when I introduce CI library or helper call inside the view then I get an error which says that the funtion is unknown.

in my contact controller:
function contact_form() {
  $data[‘where’]= ‘contact_form_view’;
  if (IS_AJAX) {
    $this->load->view(‘contact_form_view’);
  }
  else {
    $this->load->view(‘layouts/splash_layout’,$data);
  } 
}
the ajax call is made on http://mywesite/contact/contact_form
And in my form view I have a <?php echo form_error(‘name’); ?> from form helper

Does someone know how to solve this ?

Profile
 
 
Posted: 03 July 2010 06:24 AM   [ Ignore ]   [ # 1 ]  
Lab Assistant
RankRank
Total Posts:  113
Joined  08-24-2009

Everythings works correctly.
was a mistake with is_ajax

Profile