Welcome Guest, Not a member yet? Register   Sign In
Retrieve controller namd and function name from url
#11

[eluser]CroNiX[/eluser]
Why not just use your regular controller and not have a separate ajax controller? I use forms with the action submitting to the class/method for that form, but also use the same class/method to validate the form if it was submitted via ajax. Why the duplication? Is the data somehow different if submitted via ajax?

Edit:
It seems the only difference would be in how you return anything, in which case you could use
Code:
if ($this->input->is_ajax_request())
and return either json or html (or whatever you're doing)


Messages In This Thread
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 03:13 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 03:18 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 03:27 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 03:34 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 03:37 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 03:39 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 03:41 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 03:43 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 03:43 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 03:49 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 03:49 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 03:53 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 03:54 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 03:55 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 03:55 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 04:06 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 04:07 PM
Retrieve controller namd and function name from url - by El Forum - 04-16-2012, 04:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB