Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-06-2011, 05:11 PM   #1
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 3,893
Karma: 10764058
Join Date: Dec 2010
Device: Kindle PW2
Question Dynamic text with onclick & innerHTML?

I'm experimenting with creating bilingual epubs. I'd like to format sentences as non-underlined links that will display translations when the user clicks on them. I created an xhtml file that uses onclick to manipulate the innerHTML of an anchor element. It works fine as an xhtml file, but not when I add the file to an epub.
Is this yet another xhtml element not supported by the epub standard?
BTW, is there a list of valid xhtml elements that are currently not supported by the ePUB standard?
Attached Files
File Type: epub Dynamic HTML Test.epub (2.4 KB, 190 views)
File Type: zip Source.zip (448 Bytes, 191 views)
Doitsu is offline   Reply With Quote
Advert
Old 01-07-2011, 04:04 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,072
Karma: 9567891
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
ePUB renderers often have no support for any scripting capabilities, and the specification certainly does not mandate any script language, and actually disencourages them. Also, the subset of XHTML supported by ePUB (http://www.idpf.org/doc_library/epub...htm#Section2.2) does not include the "Intrinsic Events" module, which contains "onclick" et al.

So yes, dynamic content is largely not supported by the ePUB spec (nor by ePUB readers). In the specification linked above you have a list of what is (or should be) supported, both in XHTML and CSS.
Jellby is offline   Reply With Quote
Old 01-07-2011, 11:45 AM   #3
whbenson
Enthusiast
whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.
 
Posts: 37
Karma: 493532
Join Date: May 2010
Device: ipad
If your target is iBooks, then your example does indeed work there, as you probably know. Javascript is also used in some of the newer educational titles in iTunes U.
whbenson is offline   Reply With Quote
Old 01-07-2011, 06:33 PM   #4
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 3,893
Karma: 10764058
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Jellby View Post
So yes, dynamic content is largely not supported by the ePUB spec (nor by ePUB readers). In the specification linked above you have a list of what is (or should be) supported, both in XHTML and CSS.
Thanks for your quick and detailed answer. I'll check out the link.
Doitsu is offline   Reply With Quote
Reply

Tags
dynamic html, epub, innerhtml, onclick

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DR800 & tyh promised text highligting pavelh iRex 6 06-18-2010 01:08 PM
Search & replace TEXT ToeRag Calibre 3 04-10-2010 01:44 PM
Text Analysis & Paragraph Detection ahi Workshop 15 09-14-2009 11:28 PM
Cybook & text-based pdfs StephieP Bookeen 17 04-28-2008 11:50 AM


All times are GMT -4. The time now is 06:19 AM.


MobileRead.com is a privately owned, operated and funded community.