Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2009
    Location
    Hull
    Posts
    827
    Tokens
    0

    Latest Awards:

    Default Fetch URL from iFrame?

    Hi,
    I'm abit stuck...
    I want to be able to fetch a url from an iframe, I'm assuming you will need to use javascript?

    Example:
    Iframe points to "http://facebook.com?jkjfh" I want to be able to fetch that url from the iframe if possible...

    +REP for any help.

    Lew.
    Im not here to be loved, I love to be hated :-}


  2. #2
    Join Date
    Jul 2008
    Location
    Leeds, UK
    Posts
    47
    Tokens
    0

    Default

    HTML Code:
    <script type="text/javascript">
    function grabURL(){
    	var iframe = document.getElementById('frame');
    	alert(iframe.src);
    }
    </script>
    
    <input type="button" onclick="grabURL()" value="Grab URL"><br />
    <iframe src="http://google.com" id="frame"></iframe>

Posting Permissions

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