...

View Full Version : keeping iframes from loading



gmn17
05-28-2005, 12:46 AM
and hiding showing layers without onload calls
much credit goes to Harry Armadillo for helping
make this work in IE firefox and safari



<html>
<head>
<title>Snapitup and HideShow Scripts</title>
<style type="text/css">
*{margin:0;padding:0;}
#i33, #row22, #ul77 {display:none;}
#row11 {display:none;position:absolute;left:100px;top:100px;}
</style>
<script type="text/javascript">
/* script made by gmn17@hotmail.com &copy; 2005 */
function snapitup(target,statement){
var theTarget=document.getElementById(target);
{var el = document.getElementById(target).style;
el.display = el.display? "":"block";
}
theTarget.innerHTML = statement;
}
/* use this to preload content */
function hideShow(target){
var el = document.getElementById(target).style;
el.display = el.display? "":"block";
}
</script>
</head>
<body>
<a href="#null" onclick="snapitup('row22','<iframe src=http://www.yahoo.com width=90% height=500px frameborder=none style=border:0></iframe>')">Category 1</a><br>
<a href="javascript:void(0);" onclick="hideShow('i33');">Category 2</a><br>
<div id="i33"><img src="tn_1_books.gif"></div>
<p id="row22"></p>
<a href="javascript:void(0);" onclick="snapitup('row11','<table border=2 width=500 height=400 cellpadding=0 cellspacing=0><tr><td>Data One</td><td>Data Two</td><td>Data Three</td><td><a href=# class=button>More</a></td></tr></table>');">Category 3</a><br>
<div id="row11" bgcolor="#b9b9b9"></div>
<a href="#null" onclick="hideShow('ul77');">Home</a>
<ul id="ul77">
<li><a href="/pages/435.asp">Homepage</a></li>
<li><a href="/pages/435.asp">Homepage</a></li>
<li><a href="/pages/435.asp">Homepage</a></li>
<li><a href="/pages/435.asp">Homepage</a></li>
</ul>
</body>
</html>

gmn17
05-30-2005, 04:45 AM
here


/* use this to preload content */
function hideShow(target){
var el = document.getElementById(target).style;
el.display = el.display? "":"block";
}

is just generic code and is not possible to be copyrighted.
from what I was told by the copyright dude. also this part
of the code will not work with inline styling. another thing,
I find it mystifying why people make these insane scripts to
show hide ul's instead of using this type of code. it works
just fine with IE Firefox and Safari.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum