Welcome Guest, Not a member yet? Register   Sign In
controller redirects to same page and creates a page inside a page
#1

(This post was last modified: 03-11-2019, 10:25 AM by viprit.)

Hi!
I'm having a strange issue. My page is essentially several forms on the same page but when one form is completed and I do everything I need on the backend, I use redirect(base_url('dashboard')) but it creates the same page on top of the page that was already there. So If I scroll down, I can see the same page (although broken because of javascript stuff) Speed Test Scrabble Word Finder Solitaire


Has anyone dealt with this issue? I've never done a single page site before. I appreciate any feedback! let me know if you want to see the code.
Reply
#2

Redirecting will return a html page as a response but all you need to do is to validate the form data and do other stuffs as needed, then get a json response from the server instead of redirecting and show/hide forms based on the response you are getting.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB