Hide an iframe and show the original?
<p>I have 2 images if I click on first image it goes to the <code>allwidget()</code> method, which generates an <code>iframe</code>. I also have another image which calls <code>homepage()</code>, when I click on that image, the <code>iframe</code> must be hidden and original UI must be displayed.</p>

<p>My code is:</p>

<pre><code>function allwidget(url){
  var outer= document.getElementById("outer");
  outer.innerHTML = "&lt;iframe src="+url+" align='left' height='1060px' width='5760px' scrolling='no'  frameborder='0' id='lodex' style='visibility:visible;'&gt;&lt;/iframe&gt;";
}

function homepage(){
  alert("super");
  var outer= document.getElementById("lodex").style.display="visible";
  if (outer){
    var outer= document.getElementById("lodex").style.display="visible";
    document.getElementById("lodex").style.display="hidden";
  }
}
</code></pre>

<p>I tried much things, but did not get the solution</p>

<p>Please Help</p>

<p>Thanks...</p>
