I've got the following javascript, which loads the site primarypad.com with a random string after a forward slash (eg http://primarypad.com/civ8192573 )
<script language="javascript" type="text/javascript">
function createPPWorkspace()
{
var PPbaseURL = "http://www.primarypad.com";
var Stamp = new Date();
var PPrandomSuffix = '/civ' + Stamp.getUTCMilliseconds() + parseInt(Stamp.getMilliseconds() * 3.142);
var PPNewURL = PPbaseURL + PPrandomSuffix;
PPWindow = window.open(PPNewURL,'_PrimaryPad');
}
</script>
<iframe src="button" value="Create a new Primary Pad workspace" onclick="createPPWorkspace();" />
At the moment, this presents a button which opens this URL in a new window. But I'd like to instead load this JS generated URL in an iFrame. I figure I need to stick something after the iframe src= that calls on the output of the javascript, but I can't figure out how to do it.
Should clarify, as I might not have made it completely clear what I want it to do.
I want to package both of these together in a web page, so each time it's loaded, it automatically loads the generated page within an iframe. I don't want the user to have to click anything - just load the page
Bookmarks