<div>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.<br>
</div><div><br></div><div>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.</div><div><br></div><div>I tried your suggestion and also found a suggested form from Julian, posted in August 2007</div>
<div><br></div><div>in rloObject.js I have</div><div><br></div><div> function myFunction(arg){<br> alert('I am a function and my argument is ' + arg); <br> return arg.toUpperCase();<br> }</div><div><br></div><div>
simple enough function as a test.</div><div><br></div><div>Then in my Xerte script on the test title page I have</div><div><br>mydata = getURL("javascript:myFunction('a test');","");</div><div>
<br></div><div>if (mydata != undefined){<br> titleStr = mydata;<br>} else {<br> titleStr = "data not received";<br>}</div><div><br></div><div>I publish the project and then test it in Firefox and Opera</div><div>
<br></div><div>In both Opera and Firefox the alert displays.</div><div>In Opera the title of the page displays as "data not received".</div><div>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.</div>
<div><br></div><div>What am I doing wrong here?</div><div><br></div><div>Kind regards</div><div><br></div><div>Johnathan</div><div><br></div><br><div class="gmail_quote">On 3 April 2012 21:50, Dave Burnett <span dir="ltr"><<a href="mailto:d_b_burnett@hotmail.com">d_b_burnett@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">
<div><br></div><div>Launch index.htm with your parameters:</div><div><br></div><div><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></div>
<div><br></div><div><span style="font-size:10pt">add a javascript function to rloObject.js to get the querystring values:</span></div><div><br></div><div><span style="font-size:10pt">function getdata() {</span></div><div>
<div>//code to get value pairs from URL querystring</div><div>//and return them</div><div><span style="font-size:10pt">}</span></div></div><div><br></div><div><br></div><div>Call from within your Xerte piece:</div><div><span style="font-size:10pt">mydata = getURL('javascript:getdata("");', '');</span></div>
<div><br></div><div><br></div><div><br></div><br><div><hr>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<div class="im"><br>Subject: [Xerte] Re: Reading POST parameters from web page in RLO<br><br>
<div><p><span style="color:#1f497d">Hello Julian – if I use object/embed I’ll be using flashvars, correct?</span></p><p><span style="color:#1f497d"> </span></p><p><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><span style="color:#1f497d"> </span></p><p><span style="color:#1f497d">Thanks</span></p><p><span style="color:#1f497d">RonM2</span></p><p><span style="color:#1f497d"> </span></p><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p><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> </p><p><span lang="EN-GB" 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><span lang="EN-GB" style="color:#1f497d"> </span></p><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in"><p style="margin-left:.5in"><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:.5in"><span lang="EN-GB"> </span></p>
<p style="margin-left:.5in">Anyone have an example of reading ‘POST’ parameters in xerte desktop? </p><p style="margin-left:.5in"> </p><p style="margin-left:.5in">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:.5in"> </p><p style="margin-left:.5in">RonM2</p><p><span lang="EN-GB" style="font-size:12.0pt;font-family:"Times New Roman","serif""> </span></p><span lang="EN-GB">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. </span><br>
<span lang="EN-GB">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. </span><br>
</div><br></div>_______________________________________________
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.</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>