[Xerte] detect/retrieve url of an LO
Dave Burnett
d_b_burnett at hotmail.com
Sat Sep 19 19:31:47 BST 2009
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.
http://www.bing.com/search?q=pet+allergy&form=MHEINA&publ=WLHMTAG&crea=TXT_MHEINA_Health_Health_PetAllergy_1x1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20090919/897d7e16/attachment.html
More information about the Xerte
mailing list