Created
September 30, 2013 19:54
-
-
Save gmcinnes/6769227 to your computer and use it in GitHub Desktop.
Javascript for pipe helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
function iframeResizePipe() | |
{ | |
// What's the page height? | |
var height = document.body.scrollHeight; | |
// Going to 'pipe' the data to the parent through the helpframe.. | |
var pipe = document.getElementById('helpframe'); | |
// Get our current location - staging? production? local? | |
var full = location.protocol+'//'+location.hostname+(location.port ? ':'+location.port: ''); | |
// Cachebuster a precaution here to stop browser caching interfering | |
pipe.src =full+'/wp-content/themes/marsdd-test/careers_helper.html?height='+height+'&cacheb='+Math.random(); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment