SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: iframe url

Hybrid View

  1. #1
    ::==:: Bonzo_CS's Avatar
    Join Date
    Dec 2003
    Location
    (Cardiff Wales)
    Posts
    747
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    iframe url

    Hi All,

    I am looking to write a wysiyg which incorporates an iframe of the front end. The user can then click/navigate in the iframe and this will extract the url they are on and populate another area with teh content of the page.

    Id it possible to extract the URL from within the iframe for me to do this?

    I know you can't on a different domain for XSS reasons, but as this is a cms it will be on the same domain.

    Cheers

  2. #2
    SitePoint Guru
    Join Date
    Apr 2006
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    document.getElementsByTagName('iframe')[0].contentWindow.document.URL;


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •