<div>Hello Matteo,<br></div><div><br></div><div>Your file is not located on a web server so http won't find it.</div><div><br></div><div>I am guessing your file is in a folder that is in the project folder hierarchy.</div>
<div><br></div><div>Try instead</div><div><br></div><div>
<span style="color:rgb(255,0,0)">getURL(FileLocation + '<a href="http://media/pdf/comparative.pdf" target="_blank">media/pdf/comparative.pdf</a>','_blank');</span>
</div><div><span style="color:rgb(255,0,0)"><br></span></div><div><span style="color:rgb(255,0,0)"><font color="#333333">that might work.</font><font color="#333333"><br></font></span></div><div><span style="color:rgb(255,0,0)"><font color="#333333"><br>
</font></span></div><div><span style="color:rgb(255,0,0)"><font color="#333333">Kind regards and a Happy New Year</font><font color="#333333"><br></font></span></div><div><span style="color:rgb(255,0,0)"><font color="#333333"><br>
</font></span></div><div><span style="color:rgb(255,0,0)"><font color="#333333">Johnathan</font><br></span></div><br><div class="gmail_quote">On 1 January 2012 13:15, pippo pluto <span dir="ltr"><<a href="mailto:matis25@yahoo.com">matis25@yahoo.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 style="color:#000;background-color:#fff;font-family:times new roman,new york,times,serif;font-size:12pt"><div style="color:rgb(255,0,0)">
<span>Hello </span><font face="Arial">Johnathan and Dave</font></div><div style="color:rgb(255,0,0)"><br></div><div style="color:rgb(255,0,0)"><span lang="en"><span>my problem is</span> <span>here: </span></span></div><div class="im">
<div><br></div><div>getURL('<a rel="nofollow" href="http://www.bbc.co.uk/" target="_blank">http://www.bbc.co.uk</a>','_blank'); // change the first parameter to match the url of the file you want to open</div>
</div><div><span style="color:rgb(255,0,0)">ok Johnathan I wrote in my script : <br></span></div><div><span style="color:rgb(255,0,0)">debug("clicked");<br></span></div><div><span style="color:rgb(255,0,0)">getURL('<a href="http://media/pdf/comparative.pdf" target="_blank">http://media/pdf/comparative.pdf</a>','_blank');</span></div>
<div style="color:rgb(255,0,0)"><span lang="en"><span>ok</span> <span>the window opens</span> <span>in the browser</span> <span>but it</span> <span>does not display my</span> <span>document</span><span>.</span> <span>pdf</span> <span>(</span><span>comparative.pdf</span><span>).</span></span></div>
<div style="color:rgb(255,0,0)"><br></div><div>Kind regards</div>Matteo<div style="color:rgb(255,0,0)"><span lang="en"><span><br></span></span></div><div><br><br></div>

<div><br></div><div><br></div>  <div style="font-family:times new roman,new york,times,serif;font-size:12pt"> <div style="font-family:times new roman,new york,times,serif;font-size:12pt"> <font face="Arial"><div class="im">
 <hr size="1">  <b><span style="font-weight:bold">Da:</span></b> Kemp Johnathan <<a href="mailto:johnathan.kemp@ntlworld.com" target="_blank">johnathan.kemp@ntlworld.com</a>><br> <b><span style="font-weight:bold">A:</span></b> Xerte discussion list <<a href="mailto:xerte@lists.nottingham.ac.uk" target="_blank">xerte@lists.nottingham.ac.uk</a>> <br>
 </div><b><span style="font-weight:bold">Inviato:</span></b> Sabato 31 Dicembre 2011 12:11<div><div class="h5"><br> <b><span style="font-weight:bold">Oggetto:</span></b> [Xerte] Re: download file pdf<br> </div></div></font><div>
<div class="h5"> <br><div><div>Hello Dave,<br></div><div><br></div><div>I just tried your approach and that works as well - just note that it is the event's icon property that needs setting to mypic and not the event's id property. But all in all a tidier solution than the one I offered.</div>

<div><br></div><div>Nice one.</div><div><br></div><div>Kind regards</div><div><br></div><div>Johnathan</div><br><div>On 30 December 2011 23:28, Dave Burnett <span dir="ltr"><<a rel="nofollow" href="mailto:d_b_burnett@hotmail.com" target="_blank">d_b_burnett@hotmail.com</a>></span> wrote:<br>

<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">
The image itself is an allowable event target (at least it worked for me)  <div><br></div><div>image (id = mypic</div><div><span style="font-size:10pt">interaction</span></div><div><span style="font-size:10pt">event (id = mypic, event=onRelease)</span></div>

<div><span style="font-size:10pt">script (I think the problem is the way the relative path was specified originally)</span></div><div><span style="font-size:10pt"><br></span></div><div><br></div><div><div><hr>Date: Fri, 30 Dec 2011 19:13:14 +0000<br>

From: <a rel="nofollow" href="mailto:johnathan.kemp@ntlworld.com" target="_blank">johnathan.kemp@ntlworld.com</a><br>To: <a rel="nofollow" href="mailto:matis25@yahoo.com" target="_blank">matis25@yahoo.com</a>; <a rel="nofollow" href="mailto:xerte@lists.nottingham.ac.uk" target="_blank">xerte@lists.nottingham.ac.uk</a><div>

<div><br>Subject: [Xerte] Re: download file pdf<br><br><div>Hello Matteo,<br></div><div><br></div><div>Try the following</div><div><br></div><div>Create a new desktop xerte project with the icon structure</div>
<div><br></div><div>Learning Object</div><div>  Interface</div><div>
    page</div><div>      image (id = myPic url = FileLocation + 'media/myFileName.jpg')</div><div>      interaction (perpetual setting is either 1 or 0 depending on whether you want the execution flow to stop at the interaction)</div>


<div>        HotObject (rs = myPic click = 1)</div><div>           Script</div><div><br></div><div>The contents of the script are</div><div><br></div><div>debug("clicked"); // will display a debug message in preview mode to confirm click was detected<br>


getURL('<a rel="nofollow" href="http://www.bbc.co.uk" target="_blank">http://www.bbc.co.uk</a>','_blank'); // change the first parameter to match the url of the file you want to open</div><div>// getURL will open a window in your browser</div>


<div><br></div><div>Notes on properties</div><ul><li>You need to set the image icon's id property so that this can be used in the HotObject to identify what object it is responding to.</li><li>The interaction Icon can have a perpetual property of 1 or 0 try both, one of the values will stop the project flow at the interaction but I can't remember which it is - so play around with this setting.</li>


<li>The HotObject icon's rs property must be set to the same value as the Image icon's id property. The click property is set to 1 if you want the event to trigger on clicking or 0 if you want to trigger the event on mouse over.</li>


</ul><div>Hope this solves your problem</div><div><br></div><div>Kind regards </div><div><br></div><div>Johnathan</div><div><br></div><br><div>On 30 December 2011 11:26, pippo pluto <span dir="ltr"><<a rel="nofollow" href="mailto:matis25@yahoo.com" target="_blank">matis25@yahoo.com</a>></span> wrote:<br>


<blockquote style="border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:times new roman,new york,times,serif;font-size:12pt"><div>
<span>Hello Johnathan</span></div><div><span lang="en"><span>I</span> <span>tried your suggestion </span></span><span lang="en"><span>but does not work.</span></span></div><div><span lang="en"><span>Maybe I'm wrong</span> <span>but</span> <span>I do not know</span> <span>where</span> is <span>the error...I'll try again..</span></span></div>


<div><br></div><div>Kind regards</div><div>Matteo<br></div><div><br></div>  <div style="font-family:times new roman,new york,times,serif;font-size:12pt"> <div style="font-family:times new roman,new york,times,serif;font-size:12pt">


 <font face="Arial"> <hr size="1">  <b><span style="font-weight:bold">Da:</span></b> Kemp Johnathan <<a rel="nofollow" href="mailto:johnathan.kemp@ntlworld.com" target="_blank">johnathan.kemp@ntlworld.com</a>><br> <b><span style="font-weight:bold">A:</span></b> Xerte discussion list <<a rel="nofollow" href="mailto:xerte@lists.nottingham.ac.uk" target="_blank">xerte@lists.nottingham.ac.uk</a>> <br>


 <b><span style="font-weight:bold">Inviato:</span></b> Giovedì 29 Dicembre 2011 23:40<br> <b><span style="font-weight:bold">Oggetto:</span></b> [Xerte] Re: download file pdf<br> </font><div><div> <br><div><div>
The ID is used as the unique identifier of an icon, so once you set the icon property of an icon you can refer directly to it by using its ID. That is except for icons that are normally the children of an interaction icon i.e. the sort of icons you see listed when you right click on an interaction icon in desktop Xerte e.g. button, hotspot etc. These use the rs property to identify themselves and not the id property. </div>



<div><br></div><div>Julian will know the why's and wherefore's of this.</div><div><br></div><div>You can read about it in the "interactions overview" section of the Xerte help file.</div><div><br></div>


<div>
Kind regards</div><div><br></div><div>Johnathan</div><div><br></div><div>You</div><br><div>On 29 December 2011 19:26, KnowledgeWare <span dir="ltr"><<a rel="nofollow" href="mailto:knowledgeware@kccsoft.com" target="_blank">knowledgeware@kccsoft.com</a>></span> wrote:<br>



<blockquote style="border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-CA"><div><div><span style="font-size:11.0pt;color:#1f497d">Johnathan – question if you don’t mind – what’s the difference between the ‘rs’ and ‘id’ properties? What’s the appropriate use of each? Where can I learn more about these?</span></div>



<div><span style="font-size:11.0pt;color:#1f497d"> </span></div><div><span style="font-size:11.0pt;color:#1f497d">Thanks</span></div>
<div><span style="font-size:11.0pt;color:#1f497d">RonM2</span></div><div><span style="font-size:11.0pt;color:#1f497d"> </span></div>
<div><b><span style="font-size:10.0pt" lang="EN-US">From:</span></b><span style="font-size:10.0pt" lang="EN-US"> <a rel="nofollow" href="mailto:xerte-bounces@lists.nottingham.ac.uk" target="_blank">xerte-bounces@lists.nottingham.ac.uk</a> [mailto:<a rel="nofollow" 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> Thursday, December 29, 2011 3:51 AM<br><b>To:</b> pippo pluto; Xerte discussion list<br><b>Subject:</b> [Xerte] Re: download file pdf</span></div><div><div><div> </div><div><div>
Hello Matteo,</div></div><div><div> </div></div><div><div>Sorry I don't have time to test this solution before suggesting it.</div></div><div><div> </div></div><div><div>
Check out the Xerte help files.</div></div><div><div> </div></div><div><div>I don't think that by default an image icon is sensitive to mouse events and thus will not trigger an onRelease event.</div>
</div><div><div> </div></div><div><div>However you can add a hotObject icon to an interaction and then add an image icon as a child of the hotObject. This will allow mouse events to be detected by the image. I am not sure if the event will be triggered by the hot object or the image. If it is the hot object icon then you may need to use the rs property rather than the id property to identify the hotObject icon when specifying what object sends the event.</div>



</div><div><div> </div></div><div><div>Kind regards</div></div><div><div> </div></div><div><div>Johnathan</div></div><div> </div><div><div>
On 29 December 2011 07:45, pippo pluto <<a rel="nofollow" href="mailto:matis25@yahoo.com" target="_blank">matis25@yahoo.com</a>> wrote:</div><div><div><div><div style="background:white"><span style="color:black" lang="EN">hi<br>



this is my problem:</span></div></div><div><div style="background:white"><span style="color:black"> </span></div></div><div><div style="background:white"><span style="color:black" lang="EN">I have a small icon (a jpg image, it is called 'logopdf1') I would click on and download a simple PDF file (its name is comparative.pdf) :</span></div>



</div><div><div style="background:white"><span style="color:black"> </span></div></div><div><div style="background:white"><span style="color:black" lang="EN">I did it this way:</span></div></div>
<div><div style="background:white"><span style="color:black">1) </span><span style="color:black" lang="EN">I have an id (logo) associated with image</span></div></div><div><div style="background:white">
<span style="color:black" lang="EN">2) I create an interection</span></div></div><div><div style="background:white"><span style="color:black" lang="EN">3) I create an event that I called Event1,  icon : logo , eventname: onRelease</span></div>



</div><div><div style="background:white"><span style="color:black" lang="EN">4) I create a script : into the script I wrote:  getURL('media/pdf/comparative.pdf', '_blank');</span></div></div>
<div><div style="background:white"><span style="color:black"> </span></div></div><div><div style="background:white"><span style="color:black" lang="EN">but doesn't work...what code should I write in the script?</span></div>



</div><div><div style="background:white"><span style="color:black"> </span></div></div><div><div style="background:white"><span style="color:black" lang="EN">thank's</span></div></div><div>
<div style="background:white"><span style="color:black" lang="EN">Matteo Pirola</span></div></div><div><div style="background:white"><span style="color:black" lang="EN">University of Ferrara</span></div>
</div><div><div style="background:white"><span style="color:black" lang="EN">Italy</span></div></div></div><div> </div><div>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. </div>



<div>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 style="margin-bottom:12.0pt"><br>_______________________________________________<br>Xerte mailing list<br><a rel="nofollow" href="mailto:Xerte@lists.nottingham.ac.uk" target="_blank">Xerte@lists.nottingham.ac.uk</a><br>



<a rel="nofollow" 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></div></div><div> </div></div></div></div></div><br>_______________________________________________<br>
Xerte mailing list<br>
<a rel="nofollow" href="mailto:Xerte@lists.nottingham.ac.uk" target="_blank">Xerte@lists.nottingham.ac.uk</a><br>
<a rel="nofollow" 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>
<br>
<div>
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.
</div>
<div>
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><br>_______________________________________________<br>Xerte mailing list<br><a rel="nofollow" href="mailto:Xerte@lists.nottingham.ac.uk" target="_blank">Xerte@lists.nottingham.ac.uk</a><br><a rel="nofollow" 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><br> </div></div></div> </div>  </div></div><br>


_______________________________________________<br>
Xerte mailing list<br>
<a rel="nofollow" href="mailto:Xerte@lists.nottingham.ac.uk" target="_blank">Xerte@lists.nottingham.ac.uk</a><br>
<a rel="nofollow" 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>
<br>_______________________________________________
Xerte mailing list
<a rel="nofollow" href="mailto:Xerte@lists.nottingham.ac.uk" target="_blank">Xerte@lists.nottingham.ac.uk</a>
<a rel="nofollow" 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></div>                                         </div></div>
<br>_______________________________________________<br>
Xerte mailing list<br>
<a rel="nofollow" href="mailto:Xerte@lists.nottingham.ac.uk" target="_blank">Xerte@lists.nottingham.ac.uk</a><br>
<a rel="nofollow" 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>
</div><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><br><br> </div></div></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>