codeigniter navigation problem -


hi using codeigniter 1.7.3. implemented pagination in application works fine.

when click on next previous buttons works fine.

but when click other tabs home invokes homecontroller of application. after application gives error , url got changes.

http://localhost/myapp/search/pages/4 

to

http://localhost/myapp/search/pages/home 

this query printed on page.

select * my_table 0=0 , status='a' order creation_date desc limit home,2  

this process home function in homecontroller

function processhome(){         $message =  $this->input->post('message');         $requestsource = $this->input->post('requestsource');             $data['tabid'] = "home";         $data['servermessage'] = $message;         $data['includeview'] = "profilesearch";         $data['showcontainer'] ="";          $this->load->view('index', $data);       } 

this java script function called on click of home tab.

<li id="home" ><a href="javascript:void(0);" onclick="javascript:processhome();">home</a></li>       function processhome(){          $('form#containerform').attr({action: "home/processhome"});      $('form#containerform').append("<input type='hidden' name='requestsource' value='processhome' />");     $('form#containerform').submit();    } 

if possible, use "anchor" function create links.

echo anchor('home', 'home"'); 

it generate http://localhost/myapp/home

help anchor: http://codeigniter.com/user_guide/helpers/url_helper.html


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -