Activation object
The object with functions for activating the eBook and with properties
used by the Buy Page template.
Addressing the Activation object:
window.external.Activation
Functions
VerifyRegData(UserName,RegCode)
Verify the registration data, where UserName is the user name and
RegCode is the registration code.
Call: window.external.Activation.VerifyRegData(UserName,RegCode);
Return value: true if the data is correct; false if otherwise.
EnterRegData(UserName,RegCode) Register the eBook, where UserName is the user name and RegCode
is the registration code. The procedure saves
the entered data and If the data is correct, the eBook becomes
registered.
Call: window.external.Activation.EnterRegData(UserName,RegCode);
Return value: true if the data is correct; false if otherwise.
ShowBuyPage()
Open the Buy Page.
Call: window.external.Activation.ShowBuyPage();
Return value: no.
Initialize()
Initialize and start the eBook.
Call: window.external.Activation.Initialize();
Return value: no.
Properties
RegName
Call: window.external.Activation.RegName;
Returns an empty line if the eBook is unregistered; otherwise returns
the name to which it is registered.
ProtectionType
Call: window.external.Activation.ProtectionType;
Returns: 0 - if it has encoded files, 1 - if it expires after X
days, 2 - if it expires after X uses.
CurUD
Call: window.external.Activation.CurUD;
Returns the current Days/Uses if the protection is
based on a Days/Uses expiration. Before returning the value, the
eBook auto-increments the Days/Uses. Note: the Uses are auto-incremented
on each CurUD call, the Days are auto-incremented on a CurUD call
if the previous auto-incrementation has been made 24 hours ago or
later.
MaxUD
Call: window.external.Activation.MaxUD;
Returns the max Days/Uses if the protection is based on a Days/Uses
expiration.
SubmitURL
Call: window.external.Activation.SubmitURL;
Returns an empty line if the eBook doesn't require the online activation;
otherwise returns the url of the page that processes the online activations.
BookImage
Call: window.external.Activation.BookImage;
Returns the path to the file with the eBook image specified in the
compiler settings for the Buy Page.
BuyImage
Call: window.external.Activation.BuyImage;
Returns the path to the file with the image of the «Buy Now» button
specified in the compiler settings for the Buy Page.
BuyURL
Call: window.external.Activation.BuyURL;
Returns the URL of the «Buy Now» button specified in
the compiler settings for the Buy Page.
MoneyBackEnabled
Call: window.external.Activation.MoneyBackEnabled;
Returns true if the «Show Money Back Guarantee image» option
was enabled in the compiler settings for the Buy Page; otherwise
returns false.
MoneyBackImage
Call: window.external.Activation.MoneyBackImage;
Returns the path to the file with the «Money Back Guarantee» image
specified in the compiler settings for the Buy Page.
PoweredByURL
Call: window.external.Activation.PoweredByURL;
Returns the URL of the eBook Maestro site. |