Jump to content

iframe question


nabeelkhan

Recommended Posts

I have written this following code snippet somewhere in my code...

[code]<iframe id="abc" name="abc" height="100%" width="100%" src="view.php?mode=view&id=<?=$_GET['id']?>"> </iframe>[/code]

in Internet Explorer it behaves exactly as it should. i.e displays the page view.php in teh iframe...

But in Mozilla it displays an empty iframe written in it this code..

[code] <script language='javascript'>
            location.href = 'editor.php?id=2&category=2'
            </script><P>asdas</P>
<P>asdas</P>
<P>asd</P>
<P>.</P> [/code]

how to solve it...
Link to comment
https://forums.phpfreaks.com/topic/10704-iframe-question/
Share on other sites



<iframe src="iframe_page1.html"
id="testiframe"
name="testiframe"></iframe>

Most browsers need the name attribute to make the iframe part of the frame hierarchy. Some browsers (notably Mozilla) need the id to make the iframe accessible as an object. By assigning both attributes to the iframe you keep your options open. But name is far more important than id.
Link to comment
https://forums.phpfreaks.com/topic/10704-iframe-question/#findComment-40127
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.