Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 4:36 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Get Chapter name from HTML5
PostPosted: May 26th, 2014, 6:58 am 
Offline

Joined: January 28th, 2014, 4:38 pm
Posts: 54
Location: Czech Republic
Opus: OpusPro 9.75 - HTML5 exports, Evolution
OS: Win 7 x64 CZ
System: FUJITSU
Is there a change to get a Chapter name when entering a page?
It works in Preview but HTML5. It seems to me that this information is not available in .js.
Code:
var_NAVIGATION_CHAPTER = this.GetParent().GetParent().GetName(); //object on the page returns null in HTML5

It can be a hacky way.

Now I fill a variable manually but once I change the chapter name I'd have to change it on all pages.
Thanks.
O.


For this message ovo has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Get Chapter name from HTML5
PostPosted: May 26th, 2014, 10:09 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Your code is fine - chapters just don't have a name in a HTML5 Publication. Probably, because unlike pages and the publication - chapters don't have a 'physical' DOM representation.

If you forego the .GetName() and just return the parent - you'll return the chapter object.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Get Chapter name from HTML5
PostPosted: May 26th, 2014, 12:32 pm 
Offline

Joined: January 28th, 2014, 4:38 pm
Posts: 54
Location: Czech Republic
Opus: OpusPro 9.75 - HTML5 exports, Evolution
OS: Win 7 x64 CZ
System: FUJITSU
That's bad. I haven't had success with build-in Opus scoring as I described in my other post (I'll post more information - maybe it is a question to a support), so I've created my own Javascript for scoring a book/chapter/page/question in external Javascript. It means I need to enter a chapter name manually whenever I enter the page.
Thanks.
Ota


For this message ovo has been thanked by : mackavi


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 29 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group