nabeelkhan Posted May 29, 2006 Share Posted May 29, 2006 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... Quote Link to comment https://forums.phpfreaks.com/topic/10704-iframe-question/ Share on other sites More sharing options...
Ferenc Posted May 30, 2006 Share Posted May 30, 2006 <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. Quote Link to comment https://forums.phpfreaks.com/topic/10704-iframe-question/#findComment-40127 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.