<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML dir=ltr><HEAD><TITLE>Is there a way to make an exit button?</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16674" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=073452521-07082008><FONT face=Verdana
color=#0000ff size=2>I changed the case to <FONT face="Courier New"
color=#000000>getURL('javascript:closeWindow()');</FONT> but it still doesn't
work. I also tried adding the following to the main setup
script:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=073452521-07082008><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=073452521-07082008><FONT face="Courier New"
size=2>// set security to allow access to scripts in our
domain.<BR>System.security.allowDomain('*.harlandds.com');<BR>System.security.allowDomain('localhost');</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=073452521-07082008><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=073452521-07082008><FONT face=Verdana
color=#0000ff size=2>I'm testing on localhost. The updated file still doesn't
close the window. It does (and did this with getURL) cause Firefox to open a new
tab, but it's blank. The Xerte window stays open. Oh, and Firebug (a Firefox
plugin for web developers) reports "closeWindow is not defined" as a javascript
error. I'm sure that's because it isn't finding the JS code in the web
page.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=073452521-07082008><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=073452521-07082008><FONT face=Verdana
color=#0000ff size=2>P</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <B>On Behalf Of </B>Julian
Tenney<BR><B>Sent:</B> Thursday, August 07, 2008 2:08 PM<BR><B>To:</B> Xerte
discussion list<BR><B>Subject:</B> RE: [Xerte] Is there a way to make an exit
button?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV id=idOWAReplyText71904 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>getURL should work. Check
the case.</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk on
behalf of Paul Swanson<BR><B>Sent:</B> Thu 07/08/2008 18:10<BR><B>To:</B>
Xerte discussion list<BR><B>Subject:</B> RE: [Xerte] Is there a way to make an
exit button?<BR></FONT><BR></DIV>
<DIV>
<DIV dir=ltr align=left><SPAN class=895250417-07082008><FONT face=Verdana
color=#0000ff size=2>So how do you access external javascript? I've added the
following to the script section of the html page:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=895250417-07082008><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=895250417-07082008><FONT
face="Courier New" size=2>function closeWindow () {<BR> //
closes this window<BR> self.close
();<BR>}</FONT></SPAN></DIV>
<DIV><SPAN class=895250417-07082008><FONT face="Courier New" color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=895250417-07082008><FONT face="Courier New" color=#0000ff
size=2><FONT face=Verdana>I've tried calling it
with:</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=895250417-07082008><FONT face="Courier New" color=#0000ff
size=2><FONT face=Verdana></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=895250417-07082008><FONT face="Courier New"
size=2>getUrl('javascript:closeWindow()');</FONT></SPAN></DIV>
<DIV><SPAN class=895250417-07082008><FONT face="Courier New" color=#0000ff
size=2><FONT face=Verdana></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=895250417-07082008><FONT face="Courier New" color=#0000ff
size=2><FONT face=Verdana>and:</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=895250417-07082008><FONT face="Courier New" color=#0000ff
size=2><FONT face=Verdana></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=895250417-07082008><FONT face="Courier New"
size=2>ExternalInterface.call('closeWindow');</FONT></SPAN></DIV>
<DIV><SPAN class=895250417-07082008><FONT face="Courier New" color=#0000ff
size=2><FONT face=Verdana></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=895250417-07082008><FONT face="Courier New" color=#0000ff
size=2><FONT face=Verdana>Neither work, so I know I'm not doing it right.
What's the correct command and syntax? fsCommand?</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=895250417-07082008><FONT face="Courier New" color=#0000ff
size=2><FONT face=Verdana></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=895250417-07082008><FONT face="Courier New" color=#0000ff
size=2><FONT face=Verdana>Paul</FONT></DIV>
<DIV dir=ltr align=left><BR></DIV></FONT></SPAN><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <B>On Behalf Of </B>Julian
Tenney<BR><B>Sent:</B> Thursday, August 07, 2008 12:56 AM<BR><B>To:</B>
Xerte discussion list<BR><B>Subject:</B> RE: [Xerte] Is there a way to make
an exit button?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=426075407-07082008><FONT face=Arial
color=#0000ff size=2>You've got it - it will have to be some javascript. I
don't know if you can close the window without that 'a script is trying to
close this window' security dialog.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=426075407-07082008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=426075407-07082008><FONT face=Arial
color=#0000ff size=2>Let me know how you get on - I could add a close
function to the html pages Xerte publishes,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=426075407-07082008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=426075407-07082008><FONT face=Arial
color=#0000ff size=2>J</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <B>On Behalf Of </B>Paul
Swanson<BR><B>Sent:</B> 06 August 2008 23:45<BR><B>To:</B> Xerte discussion
list<BR><B>Subject:</B> [Xerte] Is there a way to make an exit
button?<BR></FONT><BR></DIV>
<DIV></DIV>
<P><FONT face=Verdana size=2>Is there a command that will close the Flash
window? rootIcon.exit(); leaves the "Loading Complete" message on screen. Or
will I have to call some javascript in the html page that launches the
course?</FONT></P>
<P><FONT face="Courier New" color=#808080
size=2>_____________________________</FONT> </P>
<P><FONT face="Courier New" color=#808080 size=2> Paul Swanson</FONT>
<BR><FONT face="Courier New" color=#808080 size=2> Portland, Oregon,
USA</FONT> <BR><FONT face="Courier New" color=#808080
size=2>_____________________________</FONT>
</P></BLOCKQUOTE></DIV></BLOCKQUOTE></BODY></HTML>