Forum Moderators: open
---------------------------------------------------------------
<body>
<script type="application/javascript">
var a=0;
function load_once(elementid){
a=a+1;
if(a == 1){
document.getElementById(elementid).innerHTML = '<iframe src="http://example.com" style="border:1px solid; padding:2px; width:800px; height:600px"></iframe>'
}
if (document.getElementById(elementid).style.display == 'none'){
document.getElementById(elementid).style.display = '';
} else {
document.getElementById(elementid).style.display = 'none';
}
}
</script>
<a href="#" onclick="javascript:load_once('kevink');">Click Me</a><br /><br />
<div id="kevink" style="margin:20px 0 0 0; display:none;">
</div>
</body>
-------------------------------------------------------------------
Even though application/javascript is the new standard, IE doesn't recognize it.
see:
[w3schools.com...]
[edited by: Gibble at 5:50 pm (utc) on Feb. 26, 2009]