View Full Version : ahhhhhhhh!! iframes - going bizarre


zed08
06-02-2006, 08:50 PM
I diced an image in photoshop and saved optimized (image and html) in imageready. One of the slices was where I wanted my iframe so I replaced that image w/ the iframe code (see below for the code used). However the problem i'm having is that instead of the htm page opening in the iframe window, 2 seconds later the htm page appears as a whole rather than in the window. Its hard to explain what it does -> go to www.geocities.com/intricatedesigns@rogers.com and click on the FAQS button to see what it does.


Here is my code used w/ the highlighted portion showing the iframe command:

<html>
<noframes><body><!--This disables the geocities ad codes--></body></noframes>
<head>

<TITLE>Intricate Designs</TITLE>


<script type="text/javascript">
<!--
if (top.frames.length > 0) {
top.location.href = location.href;
}
// -->
</script>

<style type="text/css">
body {background: black;}
img {border: none;}

h2.pos_abs
{
position:absolute;
left:180px;
top:100px
}

</style>

</head>

<body>
<h2 class="pos_abs">
<TABLE WIDTH=786 BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD COLSPAN=3>
<IMG SRC="http://i64.photobucket.com/albums/h170/intricatedesigns/iframe2_01.jpg" WIDTH=786 HEIGHT=35></TD>
</TR>
<TR>
<TD ROWSPAN=2>
<IMG SRC="http://i64.photobucket.com/albums/h170/intricatedesigns/iframe2_02.jpg" WIDTH=98 HEIGHT=392></TD>
<TD>
<iframe src="gallery.htm" width="673" height="369" frameborder="0" name="iframe"></iframe> </TD>
<TD ROWSPAN=2>
<IMG SRC="http://i64.photobucket.com/albums/h170/intricatedesigns/iframe2_04.jpg" WIDTH=15 HEIGHT=392></TD>
</TR>
<TR>
<TD>
<IMG SRC="http://i64.photobucket.com/albums/h170/intricatedesigns/iframe2_05.jpg" WIDTH=673 HEIGHT=23></TD>
</TR>
</TABLE>

</h2>


</body>
</html>
<noembed><xmp>

_________________________________________
Please.Please help me fix this prob!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

amyaurora
06-02-2006, 10:08 PM
The problem is in your javascript.

<script type="text/javascript">
<!--
if (top.frames.length > 0) {
top.location.href = location.href;
}
// -->
</script>

I put your code in my editor without the script and it worked fine. With the script it would break out of the editors own Iframe.

The javascript needs to be changed. Only now I must confess that I don't know just what it needs to rewritten as. *I'm looking still*

zed08
06-02-2006, 11:26 PM
Thanx for trying the code out! i tried doing what you said, but it still doesn't work! Please help!

zed08
06-02-2006, 11:36 PM
actually it did work! thanks! but the downside is that the ads now keep appearing on the side. Is that the outcome you got?

amyaurora
06-03-2006, 03:35 AM
The ads didn't show in the editor I was using.

pb&j
06-03-2006, 04:20 PM
try starting with this fixed up coding and move forward from there...

<html>
<head>
<TITLE>Intricate Designs</TITLE>
<style type="text/css">
body {background: black;}
img {border: none;}
h2.pos_abs{
position:absolute;
left:180px;
top:100px
}
</style>
</head>

<body>
<h2 class="pos_abs">
<TABLE WIDTH=786 BORDER=1 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD COLSPAN=3>
<IMG SRC="http://i64.photobucket.com/albums/h170/intricatedesigns/iframe2_01.jpg" WIDTH=786 HEIGHT=35></TD>
</TR>
<TR>
<TD ROWSPAN=2>
<IMG SRC="http://i64.photobucket.com/albums/h170/intricatedesigns/iframe2_02.jpg" WIDTH=98 HEIGHT=392></TD>
<TD>
<iframe src="gallery.htm" width="673" height="369" frameborder="0" name="iframe"></iframe> </TD>
<TD ROWSPAN=2>
<IMG SRC="http://i64.photobucket.com/albums/h170/intricatedesigns/iframe2_04.jpg" WIDTH=15 HEIGHT=392></TD>
</TR>
<TR>
<TD>
<IMG SRC="http://i64.photobucket.com/albums/h170/intricatedesigns/iframe2_05.jpg" WIDTH=673 HEIGHT=23></TD>
</TR>
</TABLE>
</h2>

</body>
</html>