[Xerte] Some simple Qs and comments

Tenney Julian Julian.Tenney at nottingham.ac.uk
Wed Jan 30 16:17:36 GMT 2008


Look into XMLNode.getChildByID(id) and XMLNode.index() to discover the
page number of the page on the framework you want to jump to. In the
help, look on the Prototype Extensions page:

So in a script in a page on a framework you can:

//get the FW we are in
myFW = icon.getParentByType('FW');

//find the page you want to jump to
myPage = myFW.getChildByID('id');

//find it's index
myNum = myPage.index();

//jump to it
myFW.gotoPage(myNum);



Julian

-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Paul Swanson
Sent: 30 January 2008 16:06
To: Xerte discussion list
Subject: RE: [Xerte] Some simple Qs and comments

Fred,

I don't know of a way to navigate to a specific page id. The only method
I've found to navigate to a specific page is to reference the framework
id and the page number from the id.pages() array. Perhaps Julian can
confirm that.

Cheers

Paul

> -----Original Message-----
> From: xerte-bounces at lists.nottingham.ac.uk 
> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Riley Fred
> Sent: Wednesday, January 30, 2008 7:04 AM
> To: Xerte discussion list
> Subject: RE: [Xerte] Some simple Qs and comments
> 
> Thanks for that, Paul - I'd not have guessed that, but it 
> does work, at least the nextPage() method. Do you know if 
> gotoPage() can take a unique page id (eg gotoPage('A') or 
> similar) rather than a number? This is related to the next Q 
> I'll be posting about hotspots. 
> 
> I've got to get into 'frameworks' as it looks like they're 
> crucial to building non-trivial applications. I'm still 
> trying to get my head around templates, though :(
> 
> Cheers
> 
> Fred Riley
> Learning Technologist, School of Nursing, University of Nottingham
> Vcard: http://www.nottingham.ac.uk/nursing/sonet/about/fr_uon.vcf  
> 
> > -----Original Message-----
> > From: xerte-bounces at lists.nottingham.ac.uk
> > [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Paul 
> > Swanson
> > Sent: 29 January 2008 18:42
> > To: Xerte discussion list
> > Subject: RE: [Xerte] Some simple Qs and comments
> > 
> > To respond to your main question, to navigate to the next 
> page I use a 
> > button interaction with the following in a script icon:
> > rootIcon.nextPage();
> > 
> > In my specific case this navigates to the next page on the 
> Main Icon 
> > Flow, but you could navigate to any page on any framework by using 
> > myFrameworkId.gotoPage(pageNumber).
> > pageNumber comes from the id.pages() property of the 
> framework, and, I 
> > expect, is zero-based, so pageNumber for the first page would be 0, 
> > the second page would be 1, etc.
> > 
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
> 
> 

_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte


More information about the Xerte mailing list