Welcome Guest, Not a member yet? Register   Sign In
Can't load a controller from a view, why?
#7

[eluser]Thorpe Obazee[/eluser]
Well there's none at the moment. It would via normal jQuery..

Hmm.. one moment..
Code:
<div id="container">
   <div id="sidebar">
   </div>
    <div id="main">
        <a id="trigger" href="blah.html">Click me</a>
    </div>
</div>
&lt;script&gt;
$(function(){
   $('#trigger').click(function(){
      $('#sidebar).load("&lt;?php echo site_url('controller/method');?&gt;");
   });
});
&lt;/script&gt;


Something like that but of course you can pass along data on trigger etc.
Code:
// controller

function method()
{
    if (is_ajax())
    {
        echo "I'm the sidebar content";
    }
}


Messages In This Thread
Can't load a controller from a view, why? - by El Forum - 11-14-2009, 06:34 PM
Can't load a controller from a view, why? - by El Forum - 11-14-2009, 06:51 PM
Can't load a controller from a view, why? - by El Forum - 11-14-2009, 06:53 PM
Can't load a controller from a view, why? - by El Forum - 11-14-2009, 06:57 PM
Can't load a controller from a view, why? - by El Forum - 11-14-2009, 06:59 PM
Can't load a controller from a view, why? - by El Forum - 11-14-2009, 07:39 PM
Can't load a controller from a view, why? - by El Forum - 11-14-2009, 09:45 PM
Can't load a controller from a view, why? - by El Forum - 11-14-2009, 10:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB