Welcome Guest, Not a member yet? Register   Sign In
jquery post
#1

[eluser]tirso[/eluser]
hi to all

I am using jquery to post my form, In my controller I was processed the posted value successfully, my problem now is redirect was not work.

thanks in advance

Tirso

here is my javascript

Code:
$.post("<?php echo site_url('jquerypost/form_submit_redirect') ?>",$("#formsubmit").serialize())


in my controller
Code:
function form_submit_redirect()
    {
        redirect('default_c');
    }
#2

[eluser]thinkigniter[/eluser]
From Userguide
Code:
redirect('/login/form/', 'refresh');

Your Code
Code:
redirect('default_c');

NO refesh and only the controller no function within controller...

Good Luck
#3

[eluser]tirso[/eluser]
hi thinkigniter,

form_submit_redirect - is my function under "jquerypost" controller. The default_c is my default controller. If I use native php code as an action of my forms instead of using jquery it was redirect to my default_c controller.

Thanks
#4

[eluser]Zeeshan Rasool[/eluser]
Did you check redirecting to a function inside your current controller (jquerypost) ?




Theme © iAndrew 2016 - Forum software by © MyBB