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:

Need help for Activ eBook

rlemire Does anyone know how to return a variable from an online database -- back into an Activ eBook?

I can return to my eBook using the following javascript code, but can't return a variable by adding it to the URL.


Posted on: 9:00 pm on June 27, 2003
EBookCompiler I don't know about anybody else, but I didn't understand the question ! :-) :-)  

Perhaps you could rephrase or put an example of what you're trying to do.

Posted on: 8:18 am on July 1, 2003
rlemire I'm sorry if my question was vague. I want to retrieve data from a server while using an Activ eBook.

I wasn't able to find a way to return data using
the following (return to eBook) format.

var targetURL="('##NAVIGATE('Activ_eBook_Page.htm')";

But for anyone who needs to retrieve data from an online server using PHP, here is a simple solution.

PHP has the capability to create and store data in an online text file using the following code snippet in a PHP code section.

$some_text = "here is my\ntext over few\nlines";
$fw = fopen("/path/file","w+"; //will create file if not existing

[color=red]In practice it could look like this...[/color]

$some_text = "myvar=3"; // variable you want to pass
$fw = fopen("webdata.jgp","w+"; //file created on server

This text file will actually be a JavaScript include file i.e. "webdata.js". Unfortunately Browsers cache ".js" files so if you need this data to be updated on subsequent calls you must name the extension something other than ".js"

To retrieve this data you need a statement in your HTML page.


[color=red]<SCRIPT LANGUAGE="JavaScript" SRC="http://server_location/webdata.jgp"></SCRIPT>[/color]

<SCRIPT language='javascript'>
if (myvar == 3){
alert ("its3";
alert ("itsNot3";
// your JavaScript code will retrieve "myvar" value from online "webdata.jgp"


Posted on: 4:31 pm on July 1, 2003
EBookCompiler Okay I get it now

I think I have seen a JavaScript which grabbed content into a string. Not sure about that.

Another way in an ebook might be to have use the API to use the WinInet functions to grab it into an Activ variable

And like you say, another way might be to get the server to write out some file or JavaScript that you link to from the ebook

Posted on: 2:39 pm on July 4, 2003

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