<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)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@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:12.0pt;
        font-family:"Times New Roman","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
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
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.ecxapple-converted-space
        {mso-style-name:ecxapple-converted-space;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@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=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>We’re going to write a guide on adding in new templates to the main template this month sometime: we want it done before the Apereo conference. I think it will cover how to build a simple one, how to structure the .xwd file, how to pick up the data on the javascript side and so on,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>J<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> xerte-bounces@lists.nottingham.ac.uk [mailto:xerte-bounces@lists.nottingham.ac.uk] <b>On Behalf Of </b>Kent<br><b>Sent:</b> 28 April 2015 23:43<br><b>To:</b> Xerte Lists<br><b>Subject:</b> [Xerte] Re: XOT 101 - Adding HTML/JS to a Text Page<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>Thanks to all for your input.  A great support forum like this one makes all the difference when it comes to using the product in the real world.  <o:p></o:p></span></p><div><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-family:"Calibri","sans-serif"'>Have a great day.<o:p></o:p></span></p><div><div class=MsoNormal align=center style='text-align:center'><span style='font-family:"Calibri","sans-serif"'><hr size=2 width="100%" align=center id=stopSpelling></span></div><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-family:"Calibri","sans-serif"'>From: <a href="mailto:brsmith@akamai.com">brsmith@akamai.com</a><br>To: <a href="mailto:xerte@lists.nottingham.ac.uk">xerte@lists.nottingham.ac.uk</a><br>Date: Tue, 28 Apr 2015 17:29:11 +0000<br>Subject: [Xerte] Re: XOT 101 - Adding HTML/JS to a Text Page<o:p></o:p></span></p><div><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>I’d just like to chime in and say that I’m reading this thread with interest, and looking forward to trying some of this stuff out. From my experience hacking on XOT off and on and following this list for a while now, one of the biggest barriers I’ve encountered to starting to develop my own content types is that doing so seems to be so easy that those who know how take it for granted, and those who don’t remain in the dark about exactly what this easy process entails. ;) <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>If/when I get around to trying to create my own content types I’ll try writing up what I learn and submitting it to the wiki on github, but if someone who already knows wouldn’t mind writing up even some basic guidelines including and expanding on what’s come up in this thread, I think it would be a great help to others in the future.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>—Brad<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'>On Apr 28, 2015, at 8:24 AM, Smith, John <<a href="mailto:J.J.Smith@gcu.ac.uk">J.J.Smith@gcu.ac.uk</a>> wrote:<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><div><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>Hi,<br><br>There is a problem with line breaks being converted to <br> tags, usually this is  desirable... inside script tags it is definitely not...<br><br>My advice Kent would be to learn some jQuery... for your application, in its simplest form<br><br>Add up Carbs:<br><input type="text" id="qty1"/><br><br><input type="text" id="qty2"/><br><br><br><br><br>Total : <input type="text" id="total"/><br><script>$('input').blur( function() { $('#total').val(Number($('#qty1').val()) + Number($('#qty2').val())); });</script><br><br>Paste that into any text box and it should work...<br><br>Regards,<br><br>John Smith | Learning Technologist<br>Room A250, Govan Mbeki Building | School of Health & Life Sciences | Glasgow Caledonian University<br>Cowcaddens Road | Glasgow | G4 0BA<br><br>Please address ALL support requests to<span class=ecxapple-converted-space> </span></span><span style='font-family:"Calibri","sans-serif"'><a href="mailto:hlsblt@gcu.ac.uk"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>hlsblt@gcu.ac.uk</span></a></span><span class=ecxapple-converted-space><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'> </span></span><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>where one of the School Learning Technologists will pick up the job. This will ensure that all jobs are completed as promptly as possible.<br>________________________________________<br>From:<span class=ecxapple-converted-space> </span></span><span style='font-family:"Calibri","sans-serif"'><a href="mailto:xerte-bounces@lists.nottingham.ac.uk"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>xerte-bounces@lists.nottingham.ac.uk</span></a></span><span class=ecxapple-converted-space><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'> </span></span><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>[</span><span style='font-family:"Calibri","sans-serif"'><a href="mailto:xerte-bounces@lists.nottingham.ac.uk"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>xerte-bounces@lists.nottingham.ac.uk</span></a></span><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>] On Behalf Of Julian Tenney [</span><span style='font-family:"Calibri","sans-serif"'><a href="mailto:Julian.Tenney@nottingham.ac.uk"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>Julian.Tenney@nottingham.ac.uk</span></a></span><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>]<br>Sent: 28 April 2015 13:20<br>To: Xerte discussion list<br>Subject: [Xerte] Re: XOT 101 - Adding HTML/JS to a Text Page<br><br>I put this in an embed Content page and it works – it didn’t work in a plain text page…<br><br><p>Adding Numbers</p><br><input onblur="add();" type="text" id="txt1"/><br><input onblur="add();" type="text" id="txt2"/><br><input type="text" id="txt3"/><br><br><script><br><br>function add(){<br><br> alert("adding" + document.getElementById('txt1').value + " and " + document.getElementById('txt2').value);<br><br>}<br><br></script><br><br>From: <a href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a> [<a href="mailto:xerte-bounces@lists.nottingham.ac.uk">mailto:xerte-bounces@lists.nottingham.ac.uk</a>] On Behalf Of Kent<br>Sent: 28 April 2015 12:32<br>To: Xerte Lists<br>Subject: [Xerte] XOT 101 - Adding HTML/JS to a Text Page<br><br>I need a page with a few input fields.  I want to sum the numbers from the fields into a total field.  Easy enough to add the fields to a Text page by putting the following into the "Page Text" field.<br><br>Add up Carbs:<br><input onblur="findTotal()" type="text" name="qty" id="qty2"/><br><br><input onblur="findTotal()" type="text" name="qty" id="qty2"/><br><br><br><br><br>Total : <input type="text" name="total" id="total"/><br><br>To define the FindTotal() routine, I need to add a <script> section.<br><br><script type="text/javascript"><br>   function findTotal(){<br>    // some JS code here<br>   }<br></script><br><br>As soon as I add the script section, the fields will no longer show up when I press Play.  I'm not sure what I'm doing wrong.<br><br>Any advice would be much appreciated.<br><br>Have a great day,<br>Kent<br><br><br><br><br>This message and any attachment are intended solely for the addressee<br>and may contain confidential information. If you have received this<br>message in error, please send it back to me, and immediately delete it.<br><br>Please do not use, copy or disclose the information contained in this<br>message or in any attachment.  Any views or opinions expressed by the<br>author of this email do not necessarily reflect the views of the<br>University of Nottingham.<br><br>This message has been checked for viruses but the contents of an<br>attachment may still contain software viruses which could damage your<br>computer system, you are advised to perform your own checks. Email<br>communications with the University of Nottingham may be monitored as<br>permitted by UK legislation.<br><br><br>Glasgow Caledonian University is a registered Scottish charity, number SC021474<br><br>_______________________________________________<br>Xerte mailing list<br></span><span style='font-family:"Calibri","sans-serif"'><a href="mailto:Xerte@lists.nottingham.ac.uk"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>Xerte@lists.nottingham.ac.uk</span></a></span><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'><br></span><span style='font-family:"Calibri","sans-serif"'><a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank"><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>http://lists.nottingham.ac.uk/mailman/listinfo/xerte</span></a></span><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'><br><br><br><br><br>This message and any attachment are intended solely for the addressee<br>and may contain confidential information. If you have received this<br>message in error, please send it back to me, and immediately delete it.<span class=ecxapple-converted-space> </span><br><br>Please do not use, copy or disclose the information contained in this<br>message or in any attachment.  Any views or opinions expressed by the<br>author of this email do not necessarily reflect the views of the<br>University of Nottingham.<br><br>This message has been checked for viruses but the contents of an<br>attachment may still contain software viruses which could damage your<br>computer system, you are advised to perform your own checks. Email<br>communications with the University of Nottingham may be monitored as<br>permitted by UK legislation.</span><span style='font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div></blockquote></div><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><pre><o:p> </o:p></pre><pre><o:p> </o:p></pre><pre>This message and any attachment are intended solely for the addressee<o:p></o:p></pre><pre>and may contain confidential information. If you have received this<o:p></o:p></pre><pre>message in error, please send it back to me, and immediately delete it. <o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Please do not use, copy or disclose the information contained in this<o:p></o:p></pre><pre>message or in any attachment.  Any views or opinions expressed by the<o:p></o:p></pre><pre>author of this email do not necessarily reflect the views of the<o:p></o:p></pre><pre>University of Nottingham.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>This message has been checked for viruses but the contents of an<o:p></o:p></pre><pre>attachment may still contain software viruses which could damage your<o:p></o:p></pre><pre>computer system, you are advised to perform your own checks. Email<o:p></o:p></pre><pre>communications with the University of Nottingham may be monitored as<o:p></o:p></pre><pre>permitted by UK legislation.<o:p></o:p></pre><p class=MsoNormal><span style='font-family:"Calibri","sans-serif"'><br>_______________________________________________ Xerte mailing list <a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a> <a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><o:p></o:p></span></p></div></div></div></div></body></html>