make what i type in the search bar show up in uri after pagnation page # |
[eluser]R_Nelson[/eluser]
how can I make what i type in the search bar show up in uri after pagnation page # in the url
[eluser]R_Nelson[/eluser]
I dont need to do this i solved my problem a diffrent way i stored the var into a session and then got it again on the next page!
[eluser]Andreas Karlsson[/eluser]
There is two ways. Ether you do a post first and redirect from that. Code: form_open('controller/do_search'); And in the do_search method you: Code: $var = $this->input->post('keyword'); And then you fix the redirect with javascript document.location. That way it works with javascript off an on. Or you could investigate some kind of .htaccess method and rewrite ?keyword=blabla to your controller/method.
[eluser]snifty[/eluser]
[quote author="Andreas Karlsson" date="1308055732"] ...in the do_search method you: Code: $var = $this->input->post('keyword'); And then you fix the redirect with javascript document.location. That way it works with javascript off an on. [/quote] Could I trouble you to expand a bit about the use of Javascript you refer to? I've been using the method you describe here and it seems to work fine. What would using Javascript add? TIA
[eluser]Andreas Karlsson[/eluser]
If the user presses the back-button after the search he would come to the result again. The javascript fixes that. I would do something like: Code: $('my-seach-form').submit( I have not tested this, but i should work. See: http://api.jquery.com/submit/ for more info. edit---- This form seems to remove some javascript. It should be "window . location . href" without the spaces. |
Welcome Guest, Not a member yet? Register Sign In |