Welcome Guest, Not a member yet? Register   Sign In
Need help w/ Dynamic content and passing data around

I've been using CI now for around 2 months and I really like its structure, but I'm having a hard time finding out how to do certain, "more involved" things. What I have set up is a page, and I would like dynamic content to be displayed depending on what the user does on the page.

Here's the problem I'm having...

I want to load a view, lets say '/members/' and never go to other pages, but rather, change the content on the page depending on the what the user is doing.

** I want to load the view once using function index()
** User does some processing and hits 'submit'
** Then pass info back to the controller, to pass to the model for Database querying
** Pass the info back to the controller, who then passes it to the view.
** The view then loads the new content from the controller WITHOUT reloading or going to '/members/view_info'

I've been told to look into Jquery and JSON. I have JQUERY so I can dynamically change content, but the problem I have is how to get the info BACK to the view w/o the reload. Especially when I'm returning an array of arrays, like EVENTS[event1, event 2, etc], where each event has a good amount on info associated with it.

The problem stems from someone else writing all the code that handles the information, but it must be passed to the view, like when it is passed into a view using: $this->load->view('member_view', $data);
because the page uses variables like "$rows" which are passed as $data['rows']

Once in the view I don't know of a way to "re-pass" information in that same format w/o doing a page reload. My sincerest apologies for the lengthy post, but I have been going crazy trying to understand all this and figure out a way to not have to rewrite all his work (there is a LOT).

Messages In This Thread
Need help w/ Dynamic content and passing data around - by El Forum - 04-25-2011, 04:43 AM
Need help w/ Dynamic content and passing data around - by El Forum - 04-25-2011, 05:39 AM

Theme © iAndrew 2016 - Forum software by © MyBB