Home | Products | Downloads | Order Now | Contact us      

   Best Webmaster Software Tools for Website Building!

Products > HTML Password Lock

HTML Password Lock FAQ

Password protection:

Where is my original html file? I tried to open the protected html file, but all I get is the locked info!
How to un-lock files with the software?
How to edit the locked file? I can't edit it anymore?
How to add, delete, and modify the valid user/password list?
How can I use the software to protect multiple web pages or whole web sites?
How to retrieve current login username, and display it?
How to add a logout function?
The "Back" button of web browser does not work on the locked page. How to fix this problem?

Where is my original html file? I tried to open the protected html file, but all I get is the locked info!

After protection, the file with the original file name will be protected, and the original un-protected file will backup as *.PreLock at the same directory.

Suppose you have a file named "c:\test\member.htm". After protection, the file "c:\test\member.htm" will be protected, and the original un-protected file will be saved as "c:\test\member.htm.PreLock".

To un-lock the file, you can delete the file "c:\test\member.htm", and rename file "c:\test\member.htm.PreLock" to "c:\test\member.htm".  You can also do this with the software. Please refer to the FAQ: How to un-lock files with the software?

Suggestion:
You should backup your original file carefully, such as in a backup directory. Or you can copy your html files to a new directory, and lock the html files in the new directory. In this way, you need not do un-lock processing to get the un-protected files.

How to un-lock files with the software?

After protection, the file with the original file name will be protected, and the original un-protected file will backup as *.PreLock at the same directory. You can use the software to un-lock files from the backup files.

1. In step 1, please choose "Un-lock from backup files", and add the protected file to the file list.

Unlock from locked file

2. In step 2, click "Un-lock" button.

Suggestion:
You should backup your original file carefully, such as in a backup directory. Or you can copy your html files to a new directory, and lock the html files in the new directory. In this way, you need not do un-lock processing to get the un-protected files.

How to edit the locked file? I can't edit it anymore?

You can't modify the locked file directly.

Please first unlock the locked file before the edit. Please refer to How to un-lock files with the software? for how to un-lock a locked file. After edit, you should password protect the file with the software, and upload the protected file to the web server again.

How to add, delete and modify the valid user/password list?

You can't change the valid user/password by directly modifying the locked file. To add, delete or modify the valid user/password list, please launch the software, edit the user/password list in step 2, and lock the file with the new user/password list again.

How can I use the software to protect my multi web pages or whole web sites?

In step3, select "session" or "cookie" as protection type, you can use HTML Password Lock to protect your whole web site with same password.  

HTML Password Protection Type

For "session" and "cookie" protection types, when the user first launches your web site, a password is needed, if the password is correct, it will be stored on user's local machine by cookies. When the user opens other locked web page on your web site, the locked web page will first check cookies to find password. So if you have multi locked web pages with same password on your web site, only the first locked web page will need a password, the other will automatically check cookies to find correct password.  
For "session" protection type, the cookie with password is destroyed after closing all web browsers.
For "cookie" protection type, the cookie with password will be saved for 365 days by default.

How to retrieve current login username?

This document will guide you how to retrieve current login username, then you can display a welcome message for the login user, fill the username into a input box or get more information about the user.

How does it work?

To retrieve username information, the protection type (in step 3) must be "session" or "cookie". After the user login, the username info is stored in the cookie. Then you can use JavaScript script to retrieve the username from the document cookie.

How to do it?

Use the following JavaScript scripts to retrieve username from cookie. The scripts should be placed in the protected web page (before the protection), or any other web page that login user will access.

The function getusername will return the current login username.

Online example

This example will display a welcome message for the current user:

http://www.mtopsoft.com/htmllock/example3.htm

This example will fill the current username to a text box:

http://www.mtopsoft.com/htmllock/example4.htm

How to add a logout function?

In "session" mode, the password protection use "session cookie" to store user and password info in the current session. You can add a logout click or button to log out the current login user.

Single password mode:

Source code of logout:

Below is the source code of a "logout" link:

User/password mode:

Source code of logout:

Below is the source code of a "logout" link:

The "Back" button of web browser does not work on the locked page. How to fix this problem?

By default, the "Back" button will not work on a locked page. To enable this button, when locking the HTML file, in step 3, "Advanced options", please uncheck the option "Decrypting in the body OnLoad function".

 

Search This Site:

Advanced

Main

HTML Password Lock
Screenshots
Order Now!
  Download Now

Help

Online Help
Quick Start
FAQ

Online Example

Single Password
Multi-Users/Passwords

Related Products

Search Engine Composer
Encrypt HTML Pro
Web Button Menu Maker

Who likes our products:

Rated 4.5 stars at SnapFiles
Pop at Cnet Download.com

Rated 5 Stars at The File Transit!

Home | Download | Order Now | Contact us | Links
©Copyright 2002 - 2007 MTop Software Inc. All Rights Reserved.