<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoPlainText>I wondered about that, but I'd like to understand why it's inserting at 0,0 because it might be something xerte is doing and possible we could change something so it does work properly using their embed code: here is my solution, which adds an extra div, and then adds an extra parameter z to the function so I can pass in the id of the div and then use that to set the value of the var c:<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><b><span style='font-family:"Courier New"'><div id="survey"></div><o:p></o:p></span></b></p><p class=MsoPlainText><span style='font-family:"Courier New"'><script>(function(t,e,s,n,<b>z</b>){var o,c,a;t.SMCX=t.SMCX||[],e.getElementById(n)||(o=e.getElementsByTagName(s),<b>c=document.getElementById(z)</b>,a=e.createElement(s),a.type="text/javascript",a.async=!0,a.id=n,a.src=["https:"===location.protocol?"https://":"http://","widget.surveymonkey.com/collect/website/js/EZfigXKNNLYTe3aIXp3Y0evIBYgz_2FshKsjj5OGywUjs8bbGIhnCZtatXAEg_2FxnCy.js"].join(""),c.parentNode.insertBefore(a,c))})(window,document,"script","smcx-sdk",<b>"survey"</b>);</script><a style="font: 12px Helvetica, sans-serif; color: #999; text-decoration: none;" href=https://www.surveymonkey.com/mp/customer-satisfaction-surveys/> Create your own user feedback survey </a><o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoPlainText>The original code looks for the last script icon. Presumably because it expects to do it as the page is loading, rather than being instantiated in an already loaded framework:<o:p></o:p></p><p class=MsoPlainText><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'><script>(function(t,e,s,n){var o,c,a;t.SMCX=t.SMCX||[],e.getElementById(n)||(<b>o=e.getElementsByTagName(s),c=o[o.length-1]</b>,a=e.createElement(s),a.type="text/javascript",a.async=!0,a.id=n,a.src=["https:"===location.protocol?"https://":"http://","widget.surveymonkey.com/collect/website/js/EZfigXKNNLYTe3aIXp3Y0evIBYgz_2FshKsjj5OGywUjs8bbGIhnCZtatXAEg_2FxnCy.js"].join(""),c.parentNode.insertBefore(a,c))})(window,document,"script","smcx-sdk");</script><a style="font: 12px Helvetica, sans-serif; color: #999; text-decoration: none;" href=https://www.surveymonkey.com/mp/customer-satisfaction-surveys/> Create your own user feedback survey </a><o:p></o:p></span></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><span lang=EN-US>-----Original Message-----<br>From: Pat Lockley (Pgogy) [mailto:info@pgogywebstuff.com] <br>Sent: 02 July 2015 18:58<br>To: Xerte discussion list<br>Cc: Julian Tenney<br>Subject: Re: [Xerte] Re: Embedding survey monkey</span></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>If you can share a version I can hack at it in chrome Make a page type?<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>On 2015-07-02 13:49, Julian Tenney wrote:<o:p></o:p></p><p class=MsoPlainText>> I tried that but it didn't work, but I unscrambled the code and did <o:p></o:p></p><p class=MsoPlainText>> get it to work by forcing the insertBefore to use a new div. I hate it <o:p></o:p></p><p class=MsoPlainText>> when you get js all in one line like that...<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> cheers Pat,<o:p></o:p></p><p class=MsoPlainText>> ________________________________________<o:p></o:p></p><p class=MsoPlainText>> From: <a href="mailto:xerte-bounces@lists.nottingham.ac.uk"><span style='color:windowtext;text-decoration:none'>xerte-bounces@lists.nottingham.ac.uk</span></a><o:p></o:p></p><p class=MsoPlainText>> [xerte-bounces@lists.nottingham.ac.uk] On Behalf Of Pat Lockley<o:p></o:p></p><p class=MsoPlainText>> (Pgogy) [info@pgogywebstuff.com]<o:p></o:p></p><p class=MsoPlainText>> Sent: 02 July 2015 18:26<o:p></o:p></p><p class=MsoPlainText>> To: Xerte discussion list<o:p></o:p></p><p class=MsoPlainText>> Subject: [Xerte] Re: Embedding survey monkey<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Try wrapping it in a div with a position:absolute style and then set <o:p></o:p></p><p class=MsoPlainText>> the top to something?<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> On 2015-07-02 11:08, Julian Tenney wrote:<o:p></o:p></p><p class=MsoPlainText>>> Trying to help someone embed a survey money and finding the layout<o:p></o:p></p><p class=MsoPlainText>>> breaks: has anyone successfully manipulated the embed code to get it <o:p></o:p></p><p class=MsoPlainText>>> to appear in the right place?<o:p></o:p></p><p class=MsoPlainText>>> <o:p></o:p></p><p class=MsoPlainText>>> This message and any attachment are intended solely for the addressee <o:p></o:p></p><p class=MsoPlainText>>> and may contain confidential information. If you have received this <o:p></o:p></p><p class=MsoPlainText>>> message in error, please send it back to me, and immediately delete <o:p></o:p></p><p class=MsoPlainText>>> it.<o:p></o:p></p><p class=MsoPlainText>>> <o:p></o:p></p><p class=MsoPlainText>>> Please do not use, copy or disclose the information contained in this <o:p></o:p></p><p class=MsoPlainText>>> message or in any attachment. Any views or opinions expressed by the <o:p></o:p></p><p class=MsoPlainText>>> author of this email do not necessarily reflect the views of the <o:p></o:p></p><p class=MsoPlainText>>> University of Nottingham.<o:p></o:p></p><p class=MsoPlainText>>> <o:p></o:p></p><p class=MsoPlainText>>> This message has been checked for viruses but the contents of an <o:p></o:p></p><p class=MsoPlainText>>> attachment may still contain software viruses which could damage your <o:p></o:p></p><p class=MsoPlainText>>> computer system, you are advised to perform your own checks. Email <o:p></o:p></p><p class=MsoPlainText>>> communications with the University of Nottingham may be monitored as <o:p></o:p></p><p class=MsoPlainText>>> permitted by UK legislation.<o:p></o:p></p><p class=MsoPlainText>>> <o:p></o:p></p><p class=MsoPlainText>>> <o:p></o:p></p><p class=MsoPlainText>>> _______________________________________________<o:p></o:p></p><p class=MsoPlainText>>> Xerte mailing list<o:p></o:p></p><p class=MsoPlainText>>> <a href="mailto:Xerte@lists.nottingham.ac.uk"><span style='color:windowtext;text-decoration:none'>Xerte@lists.nottingham.ac.uk</span></a><o:p></o:p></p><p class=MsoPlainText>>> <a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte"><span style='color:windowtext;text-decoration:none'>http://lists.nottingham.ac.uk/mailman/listinfo/xerte</span></a><o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> --<o:p></o:p></p><p class=MsoPlainText>> Pgogy Webstuff<o:p></o:p></p><p class=MsoPlainText>> pgogywebstuff.com<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> _______________________________________________<o:p></o:p></p><p class=MsoPlainText>> Xerte mailing list<o:p></o:p></p><p class=MsoPlainText>> <a href="mailto:Xerte@lists.nottingham.ac.uk"><span style='color:windowtext;text-decoration:none'>Xerte@lists.nottingham.ac.uk</span></a><o:p></o:p></p><p class=MsoPlainText>> <a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte"><span style='color:windowtext;text-decoration:none'>http://lists.nottingham.ac.uk/mailman/listinfo/xerte</span></a><o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> _______________________________________________<o:p></o:p></p><p class=MsoPlainText>> Xerte mailing list<o:p></o:p></p><p class=MsoPlainText>> <a href="mailto:Xerte@lists.nottingham.ac.uk"><span style='color:windowtext;text-decoration:none'>Xerte@lists.nottingham.ac.uk</span></a><o:p></o:p></p><p class=MsoPlainText>> <a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte"><span style='color:windowtext;text-decoration:none'>http://lists.nottingham.ac.uk/mailman/listinfo/xerte</span></a><o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> This message and any attachment are intended solely for the addressee <o:p></o:p></p><p class=MsoPlainText>> and may contain confidential information. If you have received this <o:p></o:p></p><p class=MsoPlainText>> message in error, please send it back to me, and immediately delete it.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Please do not use, copy or disclose the information contained in this <o:p></o:p></p><p class=MsoPlainText>> message or in any attachment. Any views or opinions expressed by the <o:p></o:p></p><p class=MsoPlainText>> author of this email do not necessarily reflect the views of the <o:p></o:p></p><p class=MsoPlainText>> University of Nottingham.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> This message has been checked for viruses but the contents of an <o:p></o:p></p><p class=MsoPlainText>> attachment may still contain software viruses which could damage your <o:p></o:p></p><p class=MsoPlainText>> computer system, you are advised to perform your own checks. Email <o:p></o:p></p><p class=MsoPlainText>> communications with the University of Nottingham may be monitored as <o:p></o:p></p><p class=MsoPlainText>> permitted by UK legislation.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>--<o:p></o:p></p><p class=MsoPlainText>Pgogy Webstuff<o:p></o:p></p><p class=MsoPlainText>pgogywebstuff.com<o:p></o:p></p></div></body></html>