Jump to content

Predefined text in an iframe


rockinaway

Recommended Posts

you can not use html inside frame tag; you use html in a noframe tag. you can create a DIV with content in it and then replace it with an iframe.

 

Like So:

 

<script language="javascript">

function loadFrame()
{
document.getElementById('predefined').innerHTML='<iframe src="http://www.google.com" width="400" height="300" style="border:solid 1px black"></iframe>';
}

</script>


<div id="predefined">
<div style="overflow:auto;width:400px;height:300px;border:solid 1px black">

My Predefined Content Here

</div>
</div>

<br><br>

<a href="javascript:loadFrame()">click me</a>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.