JavaScript works differently in IE6.0/5.5 and AEC 4.22
Dear all! I’ve worked on some nice Java for my navigation. And it works just fine in IE6 as well as IE 5.5, and also Firefox.
When I compile an eBook from the very same html source that I test browse, however, the script just doesn’t work.
(The part that fails deals with expanding a collapsed subnav to highlight the current page)
?!
What could this depend upon?
Can there be conflicts with Activ somehow? Are there Java commands that are not compatible with active ebook compiler? Note: I don’t use any Activ-scripts in my source files.
Interestingly, the script won't excecute either when I browse the same pages in IE5.0 – which renders the same result as does the eBook compiled with AEC 4.22.
And I have the exact same settings for Java handling in all my IE verions (6; 5.5 and 5.0).
Most grateful for any and all feedback! Perhaps Alaska or Sunil might shed some light on this ?
Your ebook is reading files from a temporary directory, so your Javascript is probably testing for the page, and can't recognize it.
Sunil has a variable for the temporary page path; you'll have to incorporate that into your Javascript. That way, your ebook will know what page it's on, and will synch up with your nav pane as you intended.
In my Javascript I pass the variable “location” to a function. The “location” variable contains information on the current URL when used in a browser.
In the eBook, the corresponding information is contained in the {ebookurl} predefined active variable - thanks Alaska for pointing that out! So, this is the variable that I need to work with.
As part of my navigation structure I call upon a function as follows:
How can I use the {ebookurl} variable here? Is it possible? When just inserting ‘{ebookurl}’ instead of location in the function call, I get an error saying “protocol is null” or something to that effect.
With any business, it is up to the individual owner of said business to ensure the success of the business. You may make more or less than any sample figures or results that might be quoted on our web sites or other publications. All business involves risk, and many businesses do not succeed. Further, Answers 2000 Limited does NOT represent that any particular individual or business is typical, or that any results or experiences achieved by any particular individual/business is necessarily typical.