Welcome Guest, Not a member yet? Register   Sign In
Nested View: Pass variable so that correct query results returned
#5

[eluser]Tumac[/eluser]
"Each tab should likely be hitting a controller/method that can return the (new) content for the tab (wrapped in a div, presumably). The method will take parameters that let you specify the nature of that content."


Correct - Right now I have it load a view, but would rather pass the variable back to a controller that would use the model to query for "that" customer, return results to controller and send to view. I know how to pass that back via an anchor, but not automatically. Do I need to pass it back via JS?


Here is the routine that dynamically creates the tabs. If I uncomment the " echo $cusID", the cusId will display within the content.

The cusID variable will display, I just need to pass this back now so that the controller can run the query and return the results back to the view.

Code:
foreach($cust as $cus) {
    ?>
    <div id="panel_&lt;?php echo $cus->cusID;?&gt;" class="panel">
       &lt;?php
       $cusID=$cus->cusID;
      // echo $cusID;
      $this->load->view('po/polist',$cusID)
      
       ?&gt;
    </div>


Messages In This Thread
Nested View: Pass variable so that correct query results returned - by El Forum - 12-17-2009, 12:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB