Problem With iFrame

blackhataffiliate

Senior Member
Joined
Oct 19, 2008
Messages
847
Reaction score
1,372
Set up a simple iFrame to forward a domain to another site. However when I type in framed domain - i get a blank page instead of the site I am forwarding to. Title is correct, all source code is correct and visible, but I get a blank page. Any ideas on what is causing this? If it matters, the framed domain and site I want forwarded to are being hosted on the same HostGator account. Here is the code I am using

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
  <title> Page Title</title>
  <meta name="keyword" content="keywords">
  <meta name="description" content="content">
</head>
<frameset rows="100%,*" border="0">
  <frame src="http://www.mydomain.com/" frameborder="0" />
  <frame frameborder="0" noresize />
</frameset>

<!-- pageok -->
<!-- 01 -->
<!-- 7.0-->
</html>

Can anyone help get this straight, because I cant see an error in the code or where an issue would be with the domain and/or hosting?
 
I don't think it's because of domain/hosting. But I see that your code is correct. Changed a bit:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
<title> Page Title</title>
<meta name="keyword" content="keywords">
<meta name="description" content="content">
</head>
<frameset rows="100%,*" border="0">
<frame src="http://www.mydomain.com/" frameborder="0" />
<frame frameborder="0" noresize="noresize" />
</frameset>

<!-- pageok -->
<!-- 01 -->
<!-- 7.0-->
</html>

Not tested though.
 
Thanks for pointing out the coding problem and the correction. Made the correction, but still getting the blank page.
 
Try this:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
  <title> Page Title</title>
  <meta name="keyword" content="keywords">
  <meta name="description" content="content">

	<style type="text/css" media="screen">

	body,html {

	margin:0; padding:0 0 0

	}



	/* common styles */

	iframe {

	position: absolute;

  	top:0%;

	left:0%;

	width:100%;
	height:100%;

	} 





	</style>

</head>

<body>
  <iframe src="http://www.mydomain.com/" frameborder="0"/>
</body>
<!-- pageok -->
<!-- 01 -->
<!-- 7.0-->
</html>
 
Try this:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
  <title> Page Title</title>
  <meta name="keyword" content="keywords">
  <meta name="description" content="content">

    <style type="text/css" media="screen">

    body,html {

    margin:0; padding:0 0 0

    }



    /* common styles */

    iframe {

    position: absolute;

      top:0%;

    left:0%;

    width:100%;
    height:100%;

    } 





    </style>

</head>

<body>
  <iframe src="http://www.mydomain.com/" frameborder="0"/>
</body>
<!-- pageok -->
<!-- 01 -->
<!-- 7.0-->
</html>


Thanks for the code, I tried and I still get the same thing. I have asked the domain registrar (one of the last I have with GoDaddy) to see if maybe there is an issue and I cant get anyone with any common sense to respond. So... I am trying to figure it out on my own.
 
last chance :)
Try this:
PHP:
<?php
header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
  <title> Page Title</title>
  <meta name="keyword" content="keywords">
  <meta name="description" content="content">

    <style type="text/css" media="screen">

    body,html {

    margin:0; padding:0 0 0

    }



    /* common styles */

    iframe {

    position: absolute;

      top:0%;

    left:0%;

    width:100%;
    height:100%;

    } 





    </style>

</head>

<body>
  <iframe src="http://www.mydomain.com/" frameborder="0"/>
</body>
<!-- pageok -->
<!-- 01 -->
<!-- 7.0-->
</html>
save it as php file :D

or:

load into iframe file with this code:
PHP:
<?php
header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
?>
<meta http-equiv="refresh" content="0;url=http://mydomain.com/" />
 
Last edited:
Thanks for all your help, I did get it working and it was a simple mistake that I was making.
 
Back
Top