Current iframe URL?

Discussion in 'JavaScript' started by SHOwnsYou, Sep 18, 2009.

  1. #1
    I want to run an iframe on my page, but display the current URL of the iframe in a div above it.

    Is something like this possible?
     
    SHOwnsYou, Sep 18, 2009 IP
  2. Mastermaniac

    Mastermaniac Peon

    Messages:
    128
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Its simple!

    <div id="o"></div>
    <iframe src="[COLOR="Red"]URL[/COLOR]" id="i"></iframe>
    <input type="button" value="Get!" onclick="javascript:document.getElementById('o').innerHTML=document.getElementById('i').src">
    Code (markup):
     
    Mastermaniac, Sep 18, 2009 IP
  3. vinucool5

    vinucool5 Peon

    Messages:
    34
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank You Man ! I really Needed It !
     
    vinucool5, Sep 18, 2009 IP
  4. SHOwnsYou

    SHOwnsYou Peon

    Messages:
    209
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    My users are surfing in the iframe. Just getting the src value only gives the original value.

    I found a good work around though. Thanks for the input!!
     
    SHOwnsYou, Sep 18, 2009 IP
  5. Mastermaniac

    Mastermaniac Peon

    Messages:
    128
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi Vinu! :)


    Mai Yash :p
    [└• ρεг[ƒ]εcτ •┐ ] =))
     
    Mastermaniac, Sep 18, 2009 IP
  6. Ian Carr

    Ian Carr Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #6
    Hi,


    I was just wondering if you would share the workaround you found. I am still trying to find a work around. Much appreciated.

    Thanks
     
    Ian Carr, Apr 6, 2013 IP