Created
February 15, 2011 19:06
-
-
Save jrbruce/828022 to your computer and use it in GitHub Desktop.
This is the client's page that will embed our signup iframe.
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
// Need to grab hash from page here | |
// Append hash to iFrame src url | |
// Set path to the iframe file | |
var filePath = 'http://www.google.com'; | |
// Setup the iframe target | |
var iframe='<iframe id="frame" name="widget" src ="#" width="100%" height="1" marginheight="0" marginwidth="0" frameborder="no" scrolling="no"></iframe>'; | |
// Write the iframe to the page | |
document.write(iframe); | |
var myIframe = parent.document.getElementById("frame"); | |
// Setup the width and height | |
myIframe.height = 350; | |
myIframe.width = 960; | |
myIframe.src = filePath; | |
// set the style of the iframe | |
myIframe.style.border = "1px solid #999"; | |
myIframe.style.padding = "8px"; |
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
<html> | |
<head><title>Awesome Test</title></head> | |
<body> | |
<!-- one line of JavaScript is all that is needed to generate the iframe. --> | |
<script language="JavaScript" src="js_code.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment