• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
URI change when calling controller functions

#12
[eluser]Aken[/eluser]
You could use the controller set up as you have shown, and use a method parameter to flag whether or not information should be output, or a redirect to the function page should be used.
Code:
function handler()
{
    if ($action == 'a')
    {
        $this->functionA(true);
    }
}

function functionA($redirect = false)
{
    ...

    if ($redirect === true)
    {
        // Redirect to functionA page.
    } else {
        // Load view
    }
}

You could also use Javascript to change the form's action page based on the button that was called.


Messages In This Thread
URI change when calling controller functions - by El Forum - 05-04-2011, 03:59 AM
URI change when calling controller functions - by El Forum - 05-04-2011, 04:09 AM
URI change when calling controller functions - by El Forum - 05-04-2011, 04:29 AM
URI change when calling controller functions - by El Forum - 05-04-2011, 04:36 AM
URI change when calling controller functions - by El Forum - 05-04-2011, 04:51 AM
URI change when calling controller functions - by El Forum - 05-04-2011, 04:58 AM
URI change when calling controller functions - by El Forum - 05-04-2011, 05:17 AM
URI change when calling controller functions - by El Forum - 05-04-2011, 05:21 AM
URI change when calling controller functions - by El Forum - 05-04-2011, 06:08 AM
URI change when calling controller functions - by El Forum - 07-31-2011, 10:24 AM
URI change when calling controller functions - by El Forum - 07-31-2011, 01:07 PM
URI change when calling controller functions - by El Forum - 07-31-2011, 05:41 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.