Welcome Guest, Not a member yet? Register   Sign In
Anyway to stop a controller from processing data after a view is loaded?
#1

[eluser]kwhitaker[/eluser]
Good afternoon all,

I've got a controller that has logic like this:

Code:
if(some logic)
{
  do some action
}
else
{
   if(some other logic)
   {
     do some other action
     load a view
   }

   Assuming that the above doesn't apply, process the controller accordingly.
}

The problem that I'm having right now is that the page continues to process data, even if the view is loaded. Is there anyway to stop the data from processing after the view is loaded, without nesting all of the code past the second if statement into an else?
#2

[eluser]m4rw3r[/eluser]
use return; it makes the controller action exit.




Theme © iAndrew 2016 - Forum software by © MyBB