I'm opening this modal:
<div id="myModal" class="modal fade" aria-labelledby="myModalLabel" aria-hidden="true" tabindex="-1" role="dialog">
<div class="modal-body" id="myModalBody">
<script type="text/javascript">
$(document).ready(function(){
$("#contentHistorial").attr("src","<?php echo base_url('panel/usuarios_datos/historial/' . $item->usuId ) ?>");
})
</script>
<iframe id="contentHistorial" src="<?php echo base_url('panel/usuarios_datos/historial/' . $item->usuId ) ?>"></iframe>
</div>
</div>
I'm calling it with:
<a href="#" title="Historial del Usuario" data-toggle="modal" data-html="true" data-target="#myModal" data-content="">
<?php echo $item->usuRut;?>
</a>
I have to pass the $usuRut in order to get that the modal load the content of an URL (a view) like:
panel/usuarios_datos/historial/13
where "13" has to be the usuId that comes from a link that I clic.
I can load the modal, and the content of a static page (always the content of panel/usuarios_datos/historial/1) but I can't manage to load the usuId of a link... any help?
You can load modal from remote url. I assume you use bootstrap. Modal:
Run by:
Where link is your link to .modal-content
Example fiddle: http://jsfiddle.net/koala_dev/NUCgp/918/