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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.