|
|
#1 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: May 2012
Device: iPad
|
Javascript in ePub
1) Will a js crossword puzzle work in my epub 2) Already having the .epub file what's the best way to go about inserting my html page with my crossword puzzle, and the css / js pages that accompany it. Thanks ![]() -Techno |
|
|
|
|
|
#2 |
|
Linux User
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 685
Karma: 1861395
Join Date: Sep 2010
Device: iriver Story HD
|
There's no JS in EPUB. Or any other way for interactive content for that matter. So no, it won't work. Not unless you create a static page for every possible state and give the reader instructions such as (if you want to put A in field x,y continue on page 9155)
__________________
addicted to Fantasy
|
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: May 2012
Device: iPad
|
Sorry I suppose I meant "enhanced" epub3. If you're saying there is no javascript in epub whatsoever, then it appears either
1)I need a more knowledgeable poster or 2)The interactive epubs I've been looking at that are noted as using javascript, are all lies. Thanks
|
|
|
|
|
|
#4 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,688
Karma: 3644259
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
|
yes, ePub 3 will support Javascript but you already knew that. In the context of why would you ask a question you already know the answer to, no the current ePub (version 2) does not support javascript.
__________________
Dale DePriest http://pages.suddenlink.net/dalede or http://daledepriest.wikispaces.com currently using an EZ Reader or a Literati or my iPad. |
|
|
|
|
|
#5 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: May 2012
Device: iPad
|
DaleDe,
Do you know the answer to this question: Already having the .epub file what's the best way to go about inserting my html page with my crossword puzzle, and the css / js pages that accompany it? I was looking for a forum to best post this question in, because I'm having trouble trying to integrate the javascript. I'm currently using sigil and inserting the javascript into the Misc folder, and then relinking the html page. However, this isn't providing the best results. I suppose what I'm really asking is, is there an alternative to sigil for editing the actual HTML pages that is epub specific (i.e not textwrangler / textedit or other basic html editers). With 8,131 posts and I'm sure counting I would've thought that your answer could've been more helpful, however it wasn't. I didn't ask if epub 3 will support javascript (you can reference my first post), I'm asking if it will support a javascript crossword puzzle. A question that only someone who has hopefully tried this before would've been able to answer. So please, why artificially bump that post count up and not answer my question at the same time ?
|
|
|
|
|
|
#6 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,688
Karma: 3644259
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
|
I was clarifying and correcting frostschutz post, it was not aimed at your post. It looked like you might be asking about trying something in 2.0 since you were asking about Sigil. Sigil does not support 3.0. Our wiki talks about ePub 3 and currently is weak on Javascript but have plenty of offsite links that may help. Once you figure it out please update our wiki.
I have believe that crossword puzzle should work since javascript is supported although it may be difficult to find a good reader. I am not just posting to bump up the thread. This is a discussion group, not Ask and answer.com Dale
__________________
Dale DePriest http://pages.suddenlink.net/dalede or http://daledepriest.wikispaces.com currently using an EZ Reader or a Literati or my iPad. |
|
|
|
|
|
#7 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,080
Karma: 2677223
Join Date: Dec 2010
Device: Kindle 3
|
Implementing a crossword puzzle as an ebook would be difficult even under ideal circumstances. Have you considered creating an app instead? There are couple of free programs available that let you design apps with HTML and JavaScript only.
You can read about it for example in Building iPhone Apps with HTML, CSS, and JavaScript, which you can you access for free at the O'Reilly web site. (There are also similar tools for Android based phones and tablets.) |
|
|
|
|
|
#8 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 35
Karma: 493532
Join Date: May 2010
Device: ipad
|
I don't know how hard it would be to get your specific crossword code to work, but here's a few comments about javascript with Sigil:
You can place javascript directly in the <head> section if you escape it via CDATA something like so: <script type="text/javascript"> //<![CDATA[ function setup() { //... { window.onload=setup; //]]> </script> If you prefer to work with an external file, I'll just mention that if you place it in the Styles folder - with a .css extension instead of .js - you can then edit it with Sigil and the javascript code still works. AFAIK, iBooks is the only reader that pays attention to the javascript, with the possible exception of the Kobo iOS reader. -Bill |
|
|
|
|
|
#9 | |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: May 2012
Device: iPad
|
Quote:
Bill, I had the code to load the script however I didn't have the CDATA information. I added it and my crossword is working as intended. TYVM! -Techno4 |
|
|
|
|
|
|
#10 | |
|
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Nov 2012
Device: none
|
Let no one tell you otherwise unless they have tried and failed. Your puzzle should work fine without an issues, i have developed epubs with advanced interactions. U can hook me up with your puzzle and i will give you a demo how to implement it into your epub book.
Quote:
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is there any android epub reader supporting epub3 with audio/video/javascript? | happycoding | Android Developer's Corner | 6 | 11-19-2012 06:46 PM |
| question regarding javascript and html in epub output | whol019 | ePub | 3 | 05-16-2012 01:51 PM |
| Javascript in ePub. | Vijay | ePub | 19 | 11-09-2011 09:17 PM |
| epub et javascript | zelda_pinwheel | Software | 9 | 12-09-2010 04:56 PM |
| I need Javascript help | Nate the great | Workshop | 4 | 04-04-2009 12:55 AM |