Web Analytics Made Easy -
StatCounter Forcing Gmail to open in iFrame - CodingForum

Announcement

Collapse
No announcement yet.

Forcing Gmail to open in iFrame

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Forcing Gmail to open in iFrame

    Is there any JavaScript that forces Gmail and others like Yahoo mail to open in iFrame or a frame?
    Gmail and Yahoo always kicks out of the frame.
    I looked online but did not really find something useful specially my knowledege with JavaScript is very limited.

    Code I have placed in the body:
    Code:
    <iframe id="datamain" src="http://www.gmail.com" width=700 height=650 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=yes></iframe>

    Thanks for any help,

  • #2
    That's most likely done to protect their user's security: e.g., from phishing. I would avoid doing this unless you just want to make a page for your personal convenience. I don't know if it can be done via JavaScript, but one way to circumvent the issue is to use the object element instead. According to my tests, it works in Internet Explorer 6 and 7 RC1 and fails with a “permission denied” error in Firefox. The page breaks out of the object element in Opera.

    Code:
    <object type="text/html" data="http://www.gmail.com/"></object>

    Comment


    • #3
      Thanks for replying,
      I think I should avoid this idea at all.
      It is seems loading gmail in a frame is illegal from gmail point of view.

      My site will be published for public, so I am just gonna stay away from this idea.

      Thanks,

      Comment

      Working...
      X