get url of iframe; access denied error

Discussion in 'JavaScript' started by OneHundredNetwork, Oct 19, 2009.

  1. #1
    Does anyone know of a work around when using an iframe to view another websites webpage and navigate around to get the current URL within the parent window.
     
    OneHundredNetwork, Oct 19, 2009 IP
  2. ThomasTwen

    ThomasTwen Peon

    Messages:
    113
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It's disabled for security reasons by the browser... I don't think there is a workaround. We might be able to find another way to do what you want, if you tell us a little more.
     
    ThomasTwen, Oct 19, 2009 IP
  3. OneHundredNetwork

    OneHundredNetwork Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well i'm using the IMDB website as a resource to lookup films so i can get the correct movie name, year it was made and the Unique ID asigned to that title. Using this information i then rename the file name.

    I have wrote a script where if i find the correct link i can then submit it to my own form and it will scrape the correct details i need and automaticaly rename the file for me cutting down on manual work. However instead of providing the link to the profile page for that film, i just want to be able to browse the IMDB website within an iframe and once i find the correct profile page click a button within the parent window and it will capture the src/url the iframe has currently loaded.

    if i hover over the iframe, it shows the correct url in the bottom left corner of the IE window, and if you right click you can do copy hyperlink, so just wondering of any other way to capture it.
     
    OneHundredNetwork, Oct 20, 2009 IP
  4. urstop

    urstop Peon

    Messages:
    224
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No, you cannot achieve it thru plain javascript as browsers disable cross site access for security reasons. May be will have to develop a browser add-on which will do the work for you.
     
    urstop, Oct 24, 2009 IP