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 05-31-2012, 01:47 PM   #1
Techno4
Junior Member
Techno4 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2012
Device: iPad
Javascript in ePub

I made a crossword puzzle using software that automatically exports as an html page with css and javascript externally linked. What's the best way to put this into my epub. Will this work in epub? I know that js is supported in epub 3, yes I know many readers don't have epub3 capabilities yet. I'm just asking

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
Techno4 is offline   Reply With Quote
Old 05-31-2012, 03:50 PM   #2
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 783
Karma: 2109381
Join Date: Sep 2010
Device: Kobo H2O, iriver StoryHD
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)
frostschutz is offline   Reply With Quote
 
Advertisement
Old 06-01-2012, 10:07 AM   #3
Techno4
Junior Member
Techno4 began at the beginning.
 
Posts: 6
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
Techno4 is offline   Reply With Quote
Old 06-02-2012, 02:02 AM   #4
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 9,781
Karma: 5072196
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.
DaleDe is offline   Reply With Quote
Old 06-05-2012, 11:39 AM   #5
Techno4
Junior Member
Techno4 began at the beginning.
 
Posts: 6
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 ?
Techno4 is offline   Reply With Quote
Old 06-06-2012, 01:39 PM   #6
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 9,781
Karma: 5072196
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
DaleDe is offline   Reply With Quote
Old 06-06-2012, 05:38 PM   #7
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: 2,124
Karma: 4861354
Join Date: Dec 2010
Device: Kindle PW2
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.)
Doitsu is offline   Reply With Quote
Old 06-07-2012, 11:59 PM   #8
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
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
whbenson is offline   Reply With Quote
Old 06-08-2012, 09:28 AM   #9
Techno4
Junior Member
Techno4 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2012
Device: iPad
Quote:
Originally Posted by whbenson View Post
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

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
Techno4 is offline   Reply With Quote
Old 11-05-2012, 01:50 PM   #10
Khululekani
Junior Member
Khululekani began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2012
Device: none
Thumbs up

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:
Originally Posted by Techno4 View Post
I made a crossword puzzle using software that automatically exports as an html page with css and javascript externally linked. What's the best way to put this into my epub. Will this work in epub? I know that js is supported in epub 3, yes I know many readers don't have epub3 capabilities yet. I'm just asking

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
Khululekani is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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 10 07-29-2014 12:16 PM
question regarding javascript and html in epub output whol019 ePub 3 05-16-2012 02:51 PM
Javascript in ePub. Vijay ePub 19 11-09-2011 10:17 PM
epub et javascript zelda_pinwheel Software 9 12-09-2010 05:56 PM
I need Javascript help Nate the great Workshop 4 04-04-2009 01:55 AM


All times are GMT -4. The time now is 05:49 PM.


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