Welcome Guest, Not a member yet? Register   Sign In
Multiple views and Jquery
#2

[eluser]Jay Turley[/eluser]
[quote author="kidego32" date="1231564261"]
I would like to have the upper view (displaying the customer record), as well as the transactions, refresh and update independently from the customer list (left column of the view) when a user clicks on a customer. Can this be accomplished with jquery within the mvc paradigm of codeigniter?[/quote]

Yes, it can.

I use jQuery to make POST requests to the /index.php/controller/function/parameter URLs which - typically - return the data in JSON format, and then I parse it and add it to the DOM with javascript. You can also make an AJAX request, and return views, which can be injected into the DOM through innerHTML or some such thing.

If you need more detail let me know, but really all it takes is reading the jQUery documentation for AJAX, making sure that your return data format is correct, and using json_encode() to return your results.


Messages In This Thread
Multiple views and Jquery - by El Forum - 01-09-2009, 05:11 PM
Multiple views and Jquery - by El Forum - 01-09-2009, 06:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB