using javascript to detect frame source

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marty Martin

    #1

    using javascript to detect frame source

    *** post for FREE via your newsreader at post.newsfeed.c om ***

    I am trying to write a small script that will detect the url of a frame.
    Here is my scenario.

    I have two frames. "Top" contains a local file on my server with the
    aforementioned javascript. "Bottom" is a remote website on a server I
    do not control. I want to use javascript in "Top" to determine what the
    current url is in the "bottom" frame.

    How do I do this?

    Thank you,

    Marty Martin
    news@croakingto ad.com


    -----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
    http://www.newsfeed.com - The #1 Newsgroup Service in the World!
    -----== 100,000 Groups! - 19 Servers! - Unlimited Download! =-----

  • Dietmar Meier

    #2
    Re: using javascript to detect frame source

    Marty Martin wrote:
    [color=blue]
    > I have two frames. "Top" contains a local file on my server with the
    > aforementioned javascript. "Bottom" is a remote website on a server I
    > do not control. I want to use javascript in "Top" to determine what
    > the current url is in the "bottom" frame.[/color]

    Same Origin Policy will prevent you from retrieving the URL, unless you
    either use signed script in Geckos, or enable the UniversalBrowse rRead
    privilege for a script loaded from a file: location in Geckos, or the
    browser security settings are configured to "Access data sources across
    domains" in MSIE, or the script is part of a HTML Application in MSIE,
    or you are using an aquivalent feature of your user agent.

    If you've worked around SOP, use `top.frames["Bottom"].location.href´ .

    ciao, dhgm

    Comment

    Working...