I need to generate a iframe
dynamic when I click a button on a div
for a mobile application only when I try to load this same iframe
using the Onload method in the Body it does not load automatically and only when I refresh the page (F5).
Here is part of my code:
<script>
function Map()
{
var retorno;
var largura;
var altura;
largura = ($(document).width()) - 20;
altura = ($(document).height()) -200;
retorno = '<iframe src="http://iframeasercarregado"frameborder="0" scrolling="auto" width="' + largura + '" height="' + altura + '"></iframe>';
$('.map').html(retorno);
}
</script>
<html>
<body onLoad="Map();">
<div class="map"></div>
</body>
</html>