Results 1 to 3 of 3

Thread: URL of Ifame that is generated by script

  1. #1
    Join Date
    Feb 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default URL of Ifame that is generated by script

    Hello everyone, I need a little help...

    Iframe is generated on my page by a script like this...

    Code:
    <script src="http://example.com/make_iframe"></script>
    How can I get the URL/SRC of the generated iframe?

  2. #2
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    Code:
    <script type="text/javascript">
    var src=document.getElementById("iframeID").src;
    </script>
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@ /\/\@|{
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  3. #3
    Join Date
    Aug 2007
    Location
    Ohio
    Posts
    79
    Thanks
    0
    Thanked 15 Times in 15 Posts

    Default

    We'd need to see the script. To get the urls of all the iframes on the page you could do something like this:

    Code:
    var iframes = document.getElementsByTagName("iframe");
    for(var i = 0; i < iframes.length; i++) {
    alert(iframes[i].src);
    }

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
  •