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

Activ Variables

Nick Hello,

I am somewhat confused with the use of Activ Variables in my html files.

Here is what I have done...

I wrote a simple Activ Script called start.as and it creates a variable called myvariable.

I then added the script to the add-in section to run when the e-book is fired up.

Since I want to add this varible to my index.htm page, I created an insert marker like this in the index.htm...


At run time, the tag/marker is not replaced with the variable??

To trouble shoot this problem I did two things:

1) Had the script use a message box to display my variable and it works fine so I now I know my variable is in fact recognized properly

2) Double checked the pre-processor function by using a pre-defined variable and it shows up perfect.

Why isn't my variable showing up? What am I doing wrong? Most importantly, How can I get my own variables to be inserted where I need them?

Thanks for any assistance!


Posted on: 11:35 pm on October 24, 2002
Alaska Nick -

This was discussed earlier, but it's a chance to clarify it here.

 I haven't figured out how to display it using Activ's DISPLAY() in the html page, but I can display the variables with JavaScript.  To create your own demo, paste this into an html page:


window.external.ActivSet('avar','put your text here');
var yy = window.external.ActivGet('{avar}') ;

Your variable is
< SCRIPT LANGUAGE="JavaScript">document.write(yy);< /SCRIPT>
in the middle of this sentence.


. . . . and that's it.  You'll have to repeat the ActivGet at the beginning of each page in which you want to use the Activ variable, and use the document.write to place it on the page.

 Don't forget to remove the space after each '<' symbol.  I used them here to let the code display on the forum.

best -

Posted on: 6:48 am on October 31, 2002
EBookCompiler Also on slightly different lines

The problem with what you are trying is the order of events is :-

1. Pre-defined variables set up
2. Preprocessor executes
3. start.as runs

So any variables set up by start.as will not be present at step 2

What you need to do (this can get complicated) is use the DISPLAY command, or use FILEWRITE to make a temporary HTML file and NAVIGATE to it

The way I achieved a similar effect in one e-book that I made was :-

1. Made a HTML file contain the template for the page
2. Cut it into 2 files (before and after the variable will be insert) and saved them as a .txt into the source folder
3. Use the FILEREAD command to read in these 2 txt files into 2 variables, then display them with the other variable in between, something like


Posted on: 1:05 pm on November 1, 2002

List All Archived Forums

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

Click privacy for information about our company's privacy, data collection and data retention policies, and your rights.

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