[eluser]darkhouse[/eluser]
Make an AJAX call to a controller that loads the view you want. I prefer jQuery, and it has a decent AJAX system.
Code:
//this is javascript, this forum doesn't allow script tags.
$('.form_loader').click(function(){
$.post('ajax/load_form', {file: $(this).attr('href')}, function(data){
$('form_container').html(data);
});
return false;
}
//html
<div id="form_container"></div>
<a href="simple_form" class="form_loader">Advanced Form</a>
<a href="advanced_form" class="form_loader">Advanced Form</a>
And then your PHP would be this:
Code:
class Ajax extends Controller {
function Ajax(){
parent::Controller();
}
function load_form($file){
$this->load->view($file);
}
}
I believe that should give you what you want.