View Single Post
Old 05-12-2011, 07:37 PM   PM User | #1
MichaelHGoebel
New to the CF scene

 
Join Date: May 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
MichaelHGoebel is an unknown quantity at this point
How to display the description of the page displayed in an iFrame

I have an iFrame that is loaded when a user types a url into a text box. Is it possible to display the meta-description of the page that is diplayed in the iFrame in the main (parent) page ?

Here is the Iframe code I am using in the body:

Code:
<iframe src="http://www.mhgoebel.com" frameborder="0" id="frame" width="320" height="356" scrolling="no">
</iframe>
and here is the script in the header:

Code:
<script>
    function goTo() {
        var input = get("box").value,
            frame = get("frame");

        if(input.match(/\bhttp(.)*/)) {
            frame.src = input;
        } else {
            input = "http://" + input;
            frame.src = input;
        }      
    }

    function get(id) {
        return document.getElementById(id);    
    }  
</script>
MichaelHGoebel is offline   Reply With Quote