Never ever use javascript top password protect pages. Getting around it is as easy as turning javascript off or just viewing the source code. Use server side password protect like Basic Authentication through .htaccess or a server side programming language like PHP.
stymiee
He's No Good To Me Dead
3,360 posts since May 2006
Reputation Points: 161
Solved Threads: 38
They said encryption was not an issue. So just to answer the question, yes, you are going in the right direction. Just check on those braces if it is not working correctly.
sillyboy
Practically a Master Poster
686 posts since Mar 2007
Reputation Points: 85
Solved Threads: 64
Encryption or not you can still unencrypt it or turn javascript off to defeat it. JavaScript password protection is always a bad idea.
stymiee
He's No Good To Me Dead
3,360 posts since May 2006
Reputation Points: 161
Solved Threads: 38
I am not disputing that fact. ;)
sillyboy
Practically a Master Poster
686 posts since Mar 2007
Reputation Points: 85
Solved Threads: 64
stymiee
He's No Good To Me Dead
3,360 posts since May 2006
Reputation Points: 161
Solved Threads: 38