hello,

Can you give me an iframe code that will display another page in my website. For example, I want to display specifically the login area of facebook. let say 100px by 40px. Then, when someone logged in their account it will change view to the center of the facebook and change to 500px by 700px. is it possible?

<html><head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--

#container iframe {
width:750px;
height:600px;
margin-left:-310px; //example this part will change if it moved to the next page
margin-top:-309px; //which is login home.
border:0 solid;
overflow:hidden;
}
-->
</style>
</head>
<body>
<div id="container">
<iframe src="example.html" scrolling="no"></iframe>
</div>
</body></html>

Generally, this is not possible. What you could try, however, is to make a page on your own server, that gets the page from facebook you want (the login page), and add a script tag that does something like this:

self.onunload = function() {
  window.resizeTo(500, 700);
};

Didn't test this. Perhaps, if this doesn't work, it does for onbeforeunload.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.