views:

534

answers:

4

Hi can anyone help me in maximizing the iframe window so that it make a illusion that its a page not an iframe in mozila and ie both.

I have found an article on stack overflow http://stackoverflow.com/questions/1252412/maximize-iframe-so-it-appears-to-be-the-request-page

Applying this it solves out the ie issue but not of mozila firefox.

please help

+3  A: 

This sounds like a security exploitation. Do not actually attempt this. Even if your intent is not malicious anything that comes through that iframe can carry potentially malicious code. The fastest growing vector of malicious code form JavaScript is through advertisements with crappy and easily compromised code that loads through an iframe.

I urge you to reconsider your objectives and try something else. ANYTHING ELSE.

ok please suggest....
Ankur
I agree, and suggest ANYTHING ELSE.
abelenky
+1  A: 

This works for me in FF 3.5

<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
 <head>
  <title>Test page!</title>
  <style type="text/css">
     html, body {
        overflow: hidden;
        margin: auto;
        height: 100%;
        width: 100%;
     }
  </style>
 </head>
 <body>
  <iframe src="page.htm" width="100%" height="100%" frameborder="0"></iframe>
 </body>
</html>
Nimbuz
A: 

I have a site that uses an iframe. In Firefox I can just right-click the frame and say show this frame only and the URL shows in the address bar.

Do not count on this trick to hide the address of your content.

Deverill
A: 

I've got a legitimate usage for this. I have a web application where I have to keep a track of a nominated client id for each window that might be created. I can't use cookies, because that only tracks on client, and I'm loathe to pass the client id through all my URLs, even the ones that don't need it.

So I'll be wrapping the main application view port with a iframe container that will use JS to set/get this client id in the parent/top container.

Reuben