Archived Message:
Page transfer with delay, if no password
Wiplinger
The FREE ebook should be fully functional, but when the user goes to the next page, or back or jump to a page, than a reminder of paying should pop up, unless he obtained a password (and paid for it).Is there a way to do that? Has somebody done it?
Posted on: 8:01 am on September 16, 2002
Wiplinger
If the password is set, than a variable should be set too. Can I use this variable????
Posted on: 4:33 am on September 19, 2002
EBookCompiler
Yes there is a variable {iscorrectpassword}I didn't understand the original question
Posted on: 4:49 am on September 19, 2002
Wiplinger
I tried the following script, but I did something wrong. Can anybody correct it, please.<script language="JavaScript">
if( !{iscorrectpassword} ) { ....
alert("This messages can be disabled by donation! \n\ " ) ; }
//-->
</script>
(Edited by Wiplinger at 11:40 pm on Sep. 19, 2002)
Posted on: 3:37 pm on September 19, 2002
EBookCompiler
Try something like. might not be exactly right<script language="JavaScript">
var bFlag = window.external.ActivGet('{iscorrectpassword}') ;
if( !bFlag ) {
....
alert("This messages can be disabled by donation! \n\ " ) ; }
//-->
</script>
(this will only work in a compiled E-Book, made using 4.22, and won't work if you preview your HTML pages in your browser etc)
Posted on: 6:52 pm on September 19, 2002
Wiplinger
You are right, almost ;-)var bFlag = window.external.ActivGet('{iscorrectpassword}') ; if(bFlag==0) {
is the correct way.
Now, I have tested it, and I have opened it. How can I disable my password entry again so that I can test again ;-)
Posted on: 2:23 pm on September 20, 2002
EBookCompiler
Build menu, My Password Status
Posted on: 4:54 pm on September 20, 2002
Alaska
Hi -The Activ variable returns a string. To use it for decision making, convert it to an integer with 'parseInt()' :
========================================
< script language="JavaScript"> < !-- var bFlag = window.external.ActivGet('{iscorrectpassword}') ; IntbFlag = parseInt(bFlag);
if(!IntbFlag) {
alert("These messages go away with a small gratituity! \n\ " ) ; }
//-->
</script>
========================================
I added a few spaces to the < script > tags and comments, 'cause it wouldn't display right if I didn't . . . remove them if you cut and paste.
. . . hope this helps.
Posted on: 8:22 am on September 22, 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