I have the html structure like this
<form id="form_search">
<input type="text" id="url_iframe"/>
<button id="search">Start</button>
</form>
<iframe id="iframe_search" >
</iframe>
and I trying to set the iframe scr from javascript like this
window.onload = function ()
{
document.getElementById('search').onclick = inicializar;
function inicializar ()
{
var url_iframe = "http://localhost/site/index.php";
document.getElementById('iframe_search').src = url_iframe;
}
}
But the problem is that the iframe not retain the scr value...
How can I set property to iframe?
Thanks!