Ok, we're getting there. Code for HomePage.ss:
<script type="text/javascript">
//<![CDATA[
function openpop() {
OpenWindow=window.open("", "newwin", "height=250, width=250");
OpenWindow.document.write("<html><head><title>Meet Our Staff</title></head>");
OpenWindow.document.write("<BODY>$PopupContent</BODY></html>");
OpenWindow.document.close();
self.name="main";
}
//]]>
</script>
<a href="#" onclick="openpop();">Click here</a>
Page source (IP address redacted):
<script type="text/javascript">
//<![CDATA[
function openpop() {
OpenWindow=window.open("", "newwin", "height=250, width=250");
OpenWindow.document.write("<html><!-- template silverstripe/themes/bt2/templates/Layout/HomePage.ss --><head><title>Meet Our Staff</title><link rel="stylesheet" type="text/css" href="/silverstripe/themes/bt2/css/layout.css?m=1264199304" />
<link rel="stylesheet" type="text/css" href="/silverstripe/themes/bt2/css/typography.css?m=1264445247" />
<link rel="stylesheet" type="text/css" href="/silverstripe/themes/bt2/css/form.css?m=1264007581" />
<link rel="stylesheet" type="text/css" href="/silverstripe/themes/bt2/css/layout.css?m=1264199304" />
<link rel="stylesheet" type="text/css" href="/silverstripe/themes/bt2/css/typography.css?m=1264445247" />
<link rel="stylesheet" type="text/css" href="/silverstripe/themes/bt2/css/form.css?m=1264007581" />
</head>");
OpenWindow.document.write("<BODY>Meet Patti here! <BR><br> come back soon to read all about Patti.</BODY></html><!-- end template D:\silverstripe/themes/bt2/templates/Layout/HomePage.ss -->");
OpenWindow.document.close();
self.name="main";
}
//]]>
</script>
<a href="/silverstripe/#" onclick="openpop();">Click here</a></td></tr>
So, it's getting the variable content correctly. But when I click, no popup opens. I get "openpop is not defined"
Any way to stop the style sheets, etc, from appearing?
Thanks for your help so far!