IFRAME – reload

[Total: 0    Average: 0/5]

This shows how to have an iframe changed by javascript.

Body Code:

<a href="javascript:doIt(1)">BEFORE</a><BR>
<iframe name=fm1 border=1 width=200 height=200 src="http://www.js-examples.com"></iframe>
<BR>AFTER
<BR>
NOTE: iframe is to be used in IE only.
<script>
function doIt(_v)
{
  if (_v==1)
  {
    document.all.fm1.src="http://www.js-examples.com/consult/";
  }
}
</script>

Times Viewed: 6

Leave a Reply

Your email address will not be published. Required fields are marked *