AJAX problem? - refreshed url show post values from AJAX call? |
Hi,
I'm using a bootstrap modal form (displayed when user clicks a button) to allow the user to enter some data then submit it via an ajax call to a CI controller. Then I want the CI controller that receives the AJAX request to (for now - still testing) simply refresh the page which allowed the user to fill in the modal form. A strange thing is happening though ... the url for the page BEFORE the user clicks to open the modal form OR clicks to submit the AJAX update looks like this: www.mysite.com/index.php/staff/index after the AJAX call is submitted to the controller the url looks like this: www.mysite.com/index.php/staff/index?addeventstaffdropdown=3&typeid=7&fromDate=2015-09-28&numdays=11¬es=notes anyone know why the post variables from the AJAX call are appearing in the refreshed url? Here's the JQuery code that does the AJAX submit: PHP Code: $('#addeventbutton').click(function () and heres the simple controller to redirect and refresh the 'current' page: PHP Code: public function add_event_ajax() Thanks for looking.
Have you tried leaving out the second argument in redirect(), or changing it to 'location'?
|
Welcome Guest, Not a member yet? Register Sign In |