[Xerte] detect/retrieve url of an LO
Dave Burnett
d_b_burnett at hotmail.com
Sat Sep 19 21:16:44 BST 2009
Is that null in IE?
I just did some poking around and it looks like the original call works in FireFox/Mozilla, but IE won't let you call the location object directly, it has to be through a function in the <head>.
Good old IE.
ActiveX didn't manage to totally win the browser war, but it sure introduced the world to a lot of viruses (virii?)
;-)
From: ronm at mitchellmedia.co.uk
To: xerte at lists.nottingham.ac.uk
Subject: RE: [Xerte] detect/retrieve url of an LO
Date: Sat, 19 Sep 2009 20:04:58 +0100
Thanks for the suggestion Dave
I did try something like that and just tested again using your
suggestion. When I try that locally I get file:///I:/xerte/test_templates/index.htm
but online via a toolkits installation I get null. As Julian suggested I was
wanting something like server.com/toolkits/play_123 and to be honest that’s
further complicated by the fact that the QR code and short url are generated at
runtime, so even if I could get this working it might give unpredictable
results if the LO is embedded or played via preview rather than the public url.
So in short I’ve left it so that the author just adds the public url of
the LO or the address of another site/page when authoring rather than have an
option for the url of the LO to be automatic.
Thanks for your help
Ron
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 19 September 2009 19:32
To: Xerte list
Subject: RE: [Xerte] detect/retrieve url of an LO
Ron, that's why asked if the callJS could talk to the DOM directly.
In the archives I found this posted by Julian:
I added a new function 'callJS(functionName, parameters)' which wraps
Flash's ExternalInterface.call method.
Use it like this:
callJS('myJavascriptFunctionName', 'parameters');
Now, if it is a wrap of the
ExternalInterface.call method, which looks like this:
ExternalInterface.call(”window.location.href.toString”);
then in your code,
my_location = callJS('window.location.href.toString');
*should* give you the URL location of the page the .rlo (or at least the swf
engine) is executing from.
No need for any extra javascript in the <HEAD>.
Dave
From: ronm at mitchellmedia.co.uk
To: xerte at lists.nottingham.ac.uk
Subject: RE: [Xerte] detect/retrieve url of an LO
Date: Sat, 19 Sep 2009 19:03:09 +0100
Hi Julian
As we discussed I really wanted this to work without the need
for any additional javascript so that it could be used via any toolkits installation
so if there is a function in the existing code somewhere please let me know. As
we briefly discussed it would be really good if there was a way of containing
all the code in the models and have those automatically detected and displayed
as page types available. It would make updating and keeping custom pages in
sync much easier.
I’ve created a simple example of each of the four custom
page types I’ve adapted and integrated and made them available as a zip
too at http://mitchellmedia.co.uk/?p=230
Cheers
Ron
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of RonM
Sent: 18 September 2009 09:52
To: 'Xerte discussion list'
Subject: RE: [Xerte] detect/retrieve url of an LO
Yes indeed! ....?
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 18 September 2009 09:28
To: Xerte discussion list
Subject: RE: [Xerte] detect/retrieve url of an LO
I think what you want is the server.com/toolkits/play_123,
right?
From:
xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: Friday, September 18, 2009 12:20 AM
To: Xerte list
Subject: RE: [Xerte] detect/retrieve url of an LO
Can you talk to the DOM directly with callJS?
Maybe just window.location?
Subject:
RE: [Xerte] detect/retrieve url of an LO
Date: Thu, 17 Sep 2009 15:40:36 -0700
From: Paul.Swanson at harlandfs.com
To: xerte at lists.nottingham.ac.uk
You might try a javascript
function in the launching web page:
function returnURL() {
var
baseURL = document.URL;
return
baseURL;
}
Then use Xerte’s
callJS() method to get it.
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of RonM
Sent: Thursday, September 17, 2009 3:29 PM
To: 'Xerte discussion list'
Subject: RE: [Xerte] detect/retrieve url of an LO
Thanks for the suggestion but
that doesn’t work for what I want. _url comes close but this may be a
question for Pat as what I really want is to automatically detect, or at least
dynamically create, the public url of the LO. Hopefully Pat will have a
suggestion tomorrow.
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Paul Swanson
Sent: 17 September 2009 22:53
To: Xerte discussion list
Subject: RE: [Xerte] detect/retrieve url of an LO
FileLocation?
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of RonM
Sent: Thursday, September 17, 2009 2:50 PM
To: 'Xerte discussion list'
Subject: [Xerte] detect/retrieve url of an LO
Hi Pat/Julian
I should probably know this but is there a
system variable or functions or something which automatically contains the url
of the LO?
Cheers
Ron
Hotmail: Powerful Free email with security
by Microsoft. Get it
now.
Bing
brings you health info from trusted sources. Try it now!
_________________________________________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
http://clk.atdmt.com/GBL/go/171222985/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20090919/3ec40b56/attachment.html
More information about the Xerte
mailing list