<div>Thanks,<br></div><div><br></div><div>I'll give it a try.</div><div><br></div><div>Have a wonderful Easter.</div><div><br></div><div>Johnathan</div><br><div class="gmail_quote">On 5 April 2012 15:43, Julian Tenney <span dir="ltr"><<a href="mailto:Julian.Tenney@nottingham.ac.uk">Julian.Tenney@nottingham.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-GB" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Sorry, getURL doesn’rt return data. You need to use ExtnerlaInterface.call – but for some reason that calss isn;’t available to Xerte script, so I wrapped it in callJS(func, params);</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Try </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">result = callJS(‘myFunction’, ‘Hi’);</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">debug(result);</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal" style="margin-left:36.0pt"><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""> <a href="mailto:xerte-bounces@lists.nottingham.ac.uk" target="_blank">xerte-bounces@lists.nottingham.ac.uk</a> [mailto:<a href="mailto:xerte-bounces@lists.nottingham.ac.uk" target="_blank">xerte-bounces@lists.nottingham.ac.uk</a>] <b>On Behalf Of </b>Kemp Johnathan<br>
<b>Sent:</b> 05 April 2012 15:35</span></p><div><div class="h5"><br><b>To:</b> Xerte discussion list<br><b>Subject:</b> [Xerte] Re: Reading POST parameters from web page in RLO</div></div></div><div><div class="h5"><p class="MsoNormal" style="margin-left:36.0pt">
 </p><div><p class="MsoNormal" style="margin-left:36.0pt">I am trying to do something very similar to Ron - I want to pass a pageID in the url and trap it in xerte so that a url can be used to not just open a Xerte project but also to go to a specific page in that project.</p>
</div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt">I have the function sorted to trap the parameters from the url, but I can't get the passing of data back to Xerte to work.</p>
</div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt">I tried your suggestion and also found a suggested form from Julian, posted in August 2007</p></div>
<div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt">in rloObject.js I have</p></div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt">
function myFunction(arg){<br>alert('I am a function and my argument is ' + arg); <br>return arg.toUpperCase();<br>}</p></div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt">
simple enough function as a test.</p></div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt">Then in my Xerte script on the test title page I have</p></div>
<div><p class="MsoNormal" style="margin-left:36.0pt"><br>mydata = getURL("javascript:myFunction('a test');","");</p></div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt">
if (mydata != undefined){<br>titleStr = mydata;<br>} else {<br>titleStr = "data not received";<br>}</p></div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt">
I publish the project and then test it in Firefox and Opera</p></div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt">In both Opera and Firefox the alert displays.</p>
</div><div><p class="MsoNormal" style="margin-left:36.0pt">In Opera the title of the page displays as "data not received".</p></div><div><p class="MsoNormal" style="margin-left:36.0pt">In Firefox the xerte display is displayed without anything in the page title whilst the alert is displayed. When the alert is clicked, very briefly the Xerte page displays with the title as "data not received" then the whole screen is replaced with a white screen with the text "A TEST" displayed. So this shows the function is returning something, but Xerte is not capturing it.</p>
</div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt">What am I doing wrong here?</p></div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div>
<div><p class="MsoNormal" style="margin-left:36.0pt">Kind regards</p></div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt">Johnathan</p></div><div><p class="MsoNormal" style="margin-left:36.0pt">
 </p></div><p class="MsoNormal" style="margin-left:36.0pt"> </p><div><p class="MsoNormal" style="margin-left:36.0pt">On 3 April 2012 21:50, Dave Burnett <<a href="mailto:d_b_burnett@hotmail.com" target="_blank">d_b_burnett@hotmail.com</a>> wrote:</p>
<div><div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt">Launch index.htm with your parameters:</p></div><div><p class="MsoNormal" style="margin-left:36.0pt">
 </p></div><div><p class="MsoNormal" style="margin-left:36.0pt"><a href="http://www.server.com/dir/index.htm?courseid=224&sname=fred" target="_blank">www.server.com/dir/index.htm?courseid=224&sname=fred</a></p></div>
<div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt">add a javascript function to rloObject.js to get the querystring values:</span></p>
</div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt">function getdata() {</span></p></div><div><div><p class="MsoNormal" style="margin-left:36.0pt">
//code to get value pairs from URL querystring</p></div><div><p class="MsoNormal" style="margin-left:36.0pt">//and return them</p></div><div><p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt">}</span></p>
</div></div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt">Call from within your Xerte piece:</p>
</div><div><p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt">mydata = getURL('javascript:getdata("");', '');</span></p></div><div><p class="MsoNormal" style="margin-left:36.0pt">
 </p></div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><p class="MsoNormal" style="margin-left:36.0pt"> </p><div><div class="MsoNormal" align="center" style="margin-left:36.0pt;text-align:center">
<hr size="2" width="100%" align="center"></div><p class="MsoNormal" style="margin-left:36.0pt">From: <a href="mailto:knowledgeware@kccsoft.com" target="_blank">knowledgeware@kccsoft.com</a><br>To: <a href="mailto:xerte@lists.nottingham.ac.uk" target="_blank">xerte@lists.nottingham.ac.uk</a><br>
Date: Tue, 3 Apr 2012 13:31:16 -0700</p><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt"><br>Subject: [Xerte] Re: Reading POST parameters from web page in RLO</p><div><p style="margin-left:36.0pt">
<span style="color:#1f497d">Hello Julian – if I use object/embed I’ll be using flashvars, correct?</span></p><p style="margin-left:36.0pt"><span style="color:#1f497d"> </span></p><p style="margin-left:36.0pt"><span style="color:#1f497d">I’m not sure how I could use js to get/set values. I need to pass some critical info in like courseID, LoginID, etc that is specific to each user, so I don’t see how I can ‘read’ a URL from xerte. Is there a way with js I can pass these specific values to the RLO when launched?</span></p>
<p style="margin-left:36.0pt"><span style="color:#1f497d"> </span></p><p style="margin-left:36.0pt"><span style="color:#1f497d">Thanks</span></p><p style="margin-left:36.0pt"><span style="color:#1f497d">RonM2</span></p><p style="margin-left:36.0pt">
<span style="color:#1f497d"> </span></p><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p style="margin-left:36.0pt"><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""> <a href="mailto:xerte-bounces@lists.nottingham.ac.uk" target="_blank">xerte-bounces@lists.nottingham.ac.uk</a> [mailto:<a href="mailto:xerte-bounces@lists.nottingham.ac.uk" target="_blank">xerte-bounces@lists.nottingham.ac.uk</a>] <b>On Behalf Of </b>Julian Tenney<br>
<b>Sent:</b> Tuesday, April 03, 2012 1:12 AM<br><b>To:</b> Xerte discussion list<br><b>Subject:</b> [Xerte] Re: Reading POST parameters from web page in RLO</span></p></div></div><p style="margin-left:36.0pt"> </p><p style="margin-left:36.0pt">
<span style="color:#1f497d">Either pass them inot the piece from the web page via the object / embed stuff, or (better) write some javascript functions you can call from Xerte to get / set values.</span></p><p style="margin-left:36.0pt">
<span style="color:#1f497d"> </span></p><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p style="margin-left:72.0pt"><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""> <a href="mailto:xerte-bounces@lists.nottingham.ac.uk" target="_blank">xerte-bounces@lists.nottingham.ac.uk</a> <a href="mailto:[mailto:xerte-bounces@lists.nottingham.ac.uk]" target="_blank">[mailto:xerte-bounces@lists.nottingham.ac.uk]</a> <b>On Behalf Of </b>KnowledgeWare<br>
<b>Sent:</b> 02 April 2012 22:10<br><b>To:</b> Xerte discussion list<br><b>Subject:</b> [Xerte] Reading POST parameters from web page in RLO</span></p></div></div><p style="margin-left:72.0pt"> </p><p style="margin-left:72.0pt">
Anyone have an example of reading ‘POST’ parameters in xerte desktop? </p><p style="margin-left:72.0pt"> </p><p style="margin-left:72.0pt">I’d like to launch an RLO from a webpage and pass in several parameters like courseID, LoginID, etc., but not clear on how I can ‘read’ them in when the xerte flowline starts. Do I need a JS wrapper for this?</p>
<p style="margin-left:72.0pt"> </p><p style="margin-left:72.0pt">RonM2</p><p style="margin-left:36.0pt"> </p><p class="MsoNormal" style="margin-left:36.0pt">This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. <br>
This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. </p>
</div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div><p class="MsoNormal" style="margin-left:36.0pt">_______________________________________________ Xerte mailing list <a href="mailto:Xerte@lists.nottingham.ac.uk" target="_blank">Xerte@lists.nottingham.ac.uk</a> <a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a> This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.</p>
</div></div></div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt"><br>_______________________________________________<br>Xerte mailing list<br><a href="mailto:Xerte@lists.nottingham.ac.uk" target="_blank">Xerte@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><br><br>This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.<br>
<br>This message has been checked for viruses but the contents of an attachment<br>may still contain software viruses which could damage your computer system:<br>you are advised to perform your own checks. Email communications with the<br>
University of Nottingham may be monitored as permitted by UK legislation.<br><br></p></div><p class="MsoNormal" style="margin-left:36.0pt"> </p></div></div></div></div><br>_______________________________________________<br>

Xerte mailing list<br>
<a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><br>
<br>
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.<br>

<br>
This message has been checked for viruses but the contents of an attachment<br>
may still contain software viruses which could damage your computer system:<br>
you are advised to perform your own checks. Email communications with the<br>
University of Nottingham may be monitored as permitted by UK legislation.<br>
<br>
<br></blockquote></div><br>