Viewing 5 replies - 1 through 5 (of 5 total)
  • Anonymous User

    (@anonymized-3085)

    I had a similar situation, and used the following:

    function iframeHide(){
    	if(window.location != window.parent.location){
    		document.getElementById('header').style.display='none';
    		document.getElementById('credits').style.display='none';
    	}
    }

    warning, this javascript isn’t really great and was used on a non WordPress site, there may be better solutions.

    Anonymous User

    (@anonymized-3085)

    forgot to add, that javascript goes on the site that is going to be within the iframe.

    Thread Starter surfsquish

    (@surfsquish)

    do i just add the code you mentioned in the iframe code?

    <iframe src=”https://www.searchorlandoproperties.com&#8221; width=”100%” height=”2000″ frameborder=”0″ scrolling=”auto”>

    function iframeHide(){
    if(window.location != window.parent.location){
    document.getElementById(‘header’).style.display=’none’;
    document.getElementById(‘credits’).style.display=’none’;
    }
    }

    </iframe>

    Anonymous User

    (@anonymized-3085)

    no. It has to be included, and run, on the site you are trying to include in the iframe (https://www.searchorlandoproperties.com), but you will also need a loader to get it to run, on it’s own it is of no use. If you have jQuery available you could do it like this, I think:

    jQuery(document).ready(function(){
    if(window.location != window.parent.location){
    document.getElementById('header').style.display='none';
    document.getElementById('credits').style.display='none';
    }
    });

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘If anyone can help with this, I would truly appreciate it…’ is closed to new replies.