Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2005
    Location
    Los Angeles
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    keeping iframes from loading

    and hiding showing layers without onload calls
    much credit goes to Harry Armadillo for helping
    make this work in IE firefox and safari

    Code:
    <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>

  • #2
    New Coder
    Join Date
    May 2005
    Location
    Los Angeles
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    one part

    here
    Code:
    /* 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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •