View Single Post
Old 06-08-2012, 08: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