eBook authors eBook Software - create and publish your own ebooks
Create your own eBooks
 
   
EBookApprentice.com
Learn How To Create, Publish & Market E-Books
 
   
EBookCompiler.com
E-Book Creation Software
 
   
EBookPower.com
Add sophisticated multimedia to your E-Books
 
   
CoverFactory.com
Create E-Book covers in minutes
 
 
  EBookSubmit.com
E-Book Marketing & Promotion made easy
 
  EBookJungle.com
Search engine for E-Books
 
  EBookInterviews.com
Interviews with eBook authors
 
  EBookEnhance.com
Tools for building better eBooks
 
 
 
Archived Message:

JavaScript works differently in IE6.0/5.5 and AEC 4.22


 
jaxz 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 ?

Thanks,
Jaxz


Posted on: 3:00 pm on May 3, 2006
jaxz Me again,
I tried setting html security to "low" (edit/security/advanced)
but it made no difference.

?!

/Jaxz


Posted on: 3:42 pm on May 3, 2006
Alaska Jaxz -

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.


Posted on: 5:29 pm on May 3, 2006
jaxz JavaScript using an Activ Variable

Dear all (attention Sunil / Alaska!),

I’ve come to a tricky spot.

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:

getRealAddress(location)

This function looks like :

function getRealAddress(oOb)
{ return oOb.protocol + ( ( oOb.protocol.indexOf( ':' ) + 1 ) ? '' : ':' ) + oOb.hostname + ( ( typeof(oOb.pathname) == typeof(' ') && oOb.pathname.indexOf('/') != 0 ) ? '/' : '' ) + oOb.pathname + oOb.search; }


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.

Please advice!

Best regards,
Jaxz


Posted on: 5:07 pm on May 6, 2006
Alaska jaxz -

You will want to swap out the functions' use of the 'Pathname' property:

'Pathname' is the part of a URL that specifies how to access a particular resource.

You can see the 'pathname' value with something like this:

 document.write(location.pathname)

This would produce : articles/todayspage.htm

So, you will swap the pathname value with the {ebookurl}.  Get the {ebookurl} value lilke this:

var eb_pathname ;
eb_pathname = window.external.ActivGet('{ebookurl}') ;

... now you can use 'eb_pathname' instead of 'pathname' in your function.

This may still need some modification; I'm writing on-the-fly here, without actually testing it out...


Posted on: 8:33 pm on May 6, 2006
jaxz Thanks bunches Alaska!
I’m getting there slowly.

But I think I've figured it out now.

Thanks again,
Jaxz

(Edited by jaxz at 11:09 pm on May 11, 2006)


Posted on: 4:21 pm on May 11, 2006
jaxz

(Edited by jaxz at 11:01 pm on May 11, 2006)


Posted on: 4:59 pm on May 11, 2006

Go to Active Discussion Thread

Participate in Current/New Discussions

List All Archived Forums



Copyright © 2000-2015, Answers 2000 Limited.

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.

Disclosure: Our company's websites' content (including this website's content) includes advertisements for our own company's websites, products, and services, and for other organization's websites, products, and services. In the case of links to other organization's websites, our company may receive a payment, (1) if you purchase products or services, or (2) if you sign-up for third party offers, after following links from this website. Unless specifically otherwise stated, information about other organization's products and services, is based on information provided by that organization, the product/service vendor, and/or publicly available information - and should not be taken to mean that we have used the product/service in question. Additionally, our company's websites contain some adverts which we are paid to display, but whose content is not selected by us, such as Google AdSense ads. For more detailed information, please see Advertising/Endorsements Disclosures

Our sites use cookies, some of which may already be set on your computer. Use of our site constitutes consent for this. For details, please see Privacy.

Contact Us    About and Terms Of Use    Privacy    Advertising/Endorsements Disclosures