Welcome Guest, Not a member yet? Register   Sign In
After running a method dinamically reload same page?
#4

[eluser]mddd[/eluser]
I think urls should be linked to pages. Not to actions that don't have a page attached to them.
In this case: what you want to do is perform some action and reload the page.
Why not make it so that clicking the link submits a form to the page you are already on.
The form could contain just a single POST variable. Like set_language = english.

You could extend the Controller (make a MY_Controller) that checks in its constructor to see
if $_POST['set_language'] is set. If so, run the 'languagesBackend' method. Then the controller
will continue on as normal. This way it works in every controller.

Alternatively you could put this functionality in a model and simply autoload it.


Messages In This Thread
After running a method dinamically reload same page? - by El Forum - 02-09-2010, 09:28 AM
After running a method dinamically reload same page? - by El Forum - 02-09-2010, 01:18 PM
After running a method dinamically reload same page? - by El Forum - 08-17-2010, 03:57 AM
After running a method dinamically reload same page? - by El Forum - 08-17-2010, 04:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB