Welcome Guest, Not a member yet? Register   Sign In
How do we justify this logic of CI with JQuery/AJAX?
#1

[eluser]zrowcrypt[/eluser]
JQuery's AJAX ".get" method calls a (php page)method of a controller and the returned data is further processed....but then as we consider it a best practice, controllers are meant to just transfer control to the models and views..A controller never returns anything or echoes any data...so how can we support this argument? I may be wrong..still in the initial learning stages so pardon me if you find the question a bit too naive Sad.

One eg. is JQuery's autocomplete plugin that I was trying to implement which expects an array of users name from the database. Generally, with CI..the flow is View form -> Controller -> Database Model(DATA) -> Controller (DATA)-> Another view...but if I have to implement the JQuery/AJAX way then the controller will have to output data so that the AJAX calling function (get) can grab it. Right?

Thanks for replying.


Messages In This Thread
How do we justify this logic of CI with JQuery/AJAX? - by El Forum - 10-24-2010, 12:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB