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');
<iframe src="button" value="Create a new Primary Pad workspace" onclick="createPPWorkspace();" />
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