Not only am I new here, but I really need help.

liunx

Guest
HI!<br />
<br />
Can someone help me, I saw mention of this somewhere, but I can't remember where. How do I load a page into a layer when someone clicks a button?<br />
<br />
PLEASEHELP!<br />
Thnaks.<!--content-->you mean an Iframe?<!--content-->I have to tell you I don't know what that is!<br />
<br />
I'm doing a silly little site for my Moms soccer team, and I want to be able to click on a button, and have stuff load in for each player. But I dont want to do it with hidden frames cos the code gets so big. so what I want is to build the information for every player on its own page, and then just load it in with a button click, into a layer. My experience with frames has me not wanteing to use them for this instance, and the whole effect is supposed to be like a load movie command in flash. just have a blank layer, and load stuff into it when I need to,<br />
<br />
So, is this i frame what i'm looking for> if so, weher do i find info about it?<br />
<br />
thanks<!--content-->Look here. Then once you get it in your page, you will just need a little scripting to change it dynamically.<!--content-->Originally posted by theshape <br />
So, is this i frame what i'm looking for> if so, weher do i find info about it?<br />
<br />
thanks You can find info about iframes here:<br />
<br />
<!-- m --><a class="postlink" href="http://www.wdvl.com/Authoring/HTML/4/Tags/iframe.html">http://www.wdvl.com/Authoring/HTML/4/Tags/iframe.html</a><!-- m --> <br />
<br />
Note: iFrames don't work in Netscape, but works fine in IE.<br />
<br />
Originally posted by COBOLdinosaur <br />
Look here. Then once you get it in your page, you will just need a little scripting to change it dynamically. :confused: You forgot the url!;)<!--content-->The Netscape equivalent of iframe is layer.<!--content-->oh yeah? that's awesome!<br />
<br />
:D but how do I get my page to load into a layer?<br />
<br />
See, I have a button, and if this was a frame, I would use a <a href=http://www.htmlforums.com/archive/index.php/"file.htm" target="framename"> right? but how with a layer?<br />
<br />
I've been to the HTMLgoodies site, and though they explain layers, no one explains how to do that.<br />
<br />
PLEASE HELP ME!!!<!--content-->if you get your page to load in the layer then IE will not load it correctly. as the Iframe is IE specific and the layer is Netscape specific.<br />
<br />
I don't think you are going to get a whole page to load in a layer. you might get like a tooltip to load but not an html page.<br />
<br />
<LAYER NAME="layer1" VISIBILITY="hide" BGCOLOR="ff00ff" WIDTH="100" HEIGHT="100" TOP="105" LEFT="450"><center>Ta Da!</center></LAYER> <br />
<br />
<A HREF=http://www.htmlforums.com/archive/index.php/"www.htmlgoodies.com" <br />
onMouseOver="document.layer1.visibility='show'" <br />
onMouseOut="document.layer1.visibility='hide'">Go to Goodies</A><!--content-->Maybe something like this:<br />
<br />
<layer name="playerLayer" id="playerLayer" width="200" height="200" <br />
src=http://www.htmlforums.com/archive/index.php/"blank.html" top="200" left="200"><br />
<iframe name="playerFrame" id="playerFrame" width="200" height="200" <br />
src=http://www.htmlforums.com/archive/index.php/"blank.html" top="200" left="200"><br />
</iframe><br />
</layer> <br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"renaldo.html" onclick="loadLayer(this);return false">Renaldo</a><br /><br />
<a href=http://www.htmlforums.com/archive/index.php/"pele.html" onclick="loadLayer(this);return false">Pele</a><br /><br />
<a href=http://www.htmlforums.com/archive/index.php/"beckham.html" onclick="loadLayer(this);return false">Beckham</a><br /><br />
<script language="JavaScript"><br />
function loadLayer(anch) {<br />
var target = "";<br />
if (document.getElementById) // IE5 & NS6<br />
target = document.getElementById("playerFrame")<br />
else<br />
if (document.all) // IE4<br />
target = document.all.playerFrame<br />
else<br />
if (document.layers) // NN4<br />
target = document.layers.playerLayer;<br />
if (!target) return false;<br />
target.src = <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/anch.href;">http://www.htmlforums.com/archive/index.php/anch.href;</a><!-- m --><br />
return true;<br />
}<br />
</script><!--content-->
 
Back
Top