[eluser]arthurhanlon[/eluser]
Hi there. I'm fairly new to Codeigniter and so far think it's awesome. Am also in the process of learning jQuery and AJAX and am loving them both too.
I am in the middle of a fairly small personal project building a returns system as a way to learn how Codeigniter works and am wondering about the best way to achieve something.
On a single return, you can have many lines for multiple products you are attaching to the return itself. At the moment, I have my controller using models to get all the returns in a the system and am using a view to display the paginated results on screen. My goal is to use jQuery to allow the user to expand the return to view all the items related to that return.
The only thing that worries me here is that I do have a little programming logic in the view file that retrieves each individual return's items and hides them in a div that can be enabled later by the user when he/she wants.
I realise it's probably best practice to have any kind of logic in the view files so am wondering how other might achieve the same functionality but without this mixing of programming logic with display logic?
Any advice much appreciated.
Cheers,
Arthur