If you use Bootstrap, you use jQuery. If you use jQuery, you can simply define a <div>
where to display the content you want if you need to use a iframe
.
To achieve this you should only define your div:
<div id="show"></div>
and with jQuery use the load
:
function
<script>
$("#option").on("change", function(){
//A continuación tomamos el valor del select (option) y elegimos qué mostrar
switch($(this).val()){
case "1":
$("#show").load("/pagina1.php");
break;
case "2":
$("#show").load("/pagina2.php");
break;
case "3":
$("#show").load("/pagina3.php");
break;
case "4":
$("#show").load("/pagina4.php");
break;
}
});
</script>
You can even be more specific and define what section of the page you want to upload:
$("#show").load("/pagina2.php body");
and define some action for when the loading of the document ends:
$("#show").load("/pagina2.php form", function(){
$("#inputDePagina2").focus();
});