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:

External javascript file


 
ajsaw I am trying to call an external javascript file into into my e-book and can't seem to get the syntax right.

If I use <SCRIPT src="dataFile.js"></script> and include the file in the e-book I have no problems. I need the file to be separate from the e-book, although still in the same directory.

I have excluded it from the e-book compilation but as I say I can't seem to get the syntax right for calling in the external file.

Any help will be greatly appreciated.


Posted on: 5:25 am on November 11, 2002
auctioneer Have you tried putting the javascript file in a seperate directory and the using the "include" feature?

I used it for my e-book to call in common headers and footers for design purposes. There is no reason why you couldn't just enable and use it for one page.

Give it a shot!


Posted on: 11:43 pm on November 11, 2002
Alaska To build an ebook that reads in an external .js file, using the configuration you described, try the [app] variable.  It will insert the current book path in front of the filename:

< SCRIPT LANGUAGE="JavaScript" SRC="[={app}]/insert_me.js">< /script>

 ...just be sure to turn the Preprocessor on for that page.

 In this configuration, any change in the .js file will reflect in the ebook as soon as you hit 'refresh.'

Be sure to remove the spaces after each '<' symbol when cutting and pasting.  It was added here for display online.

 Hope this helps -


Posted on: 1:19 am on November 12, 2002
ajsaw Thanks Roger. That's perfect. I was sort of in the right area but wasn't getting the syntax right. Among other things I didn't have the square brackets in.

Allan.


Posted on: 2:19 am on November 12, 2002

Go to discussion thread


Participate in current/new discussions



Copyright © 2000-2008, 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.

About and Terms Of Use    Privacy