As far as I know, client-side script cannot access a database on the server. There is server side javascript that can. It is refered to as "live wire"
http://developer.netscape.com/docs/manuals/communicator/jsref/index.htm chapter 10
I have my own Apache server and it is configured so that to access a certain page a dialog pops up asking for user name and password(I have to run a dos program to encript and add a user name and password to a file). or you can use any server side scripting or cgi or
servlet or
jsp to check against stored values in a database(or flat file) as you are thinking.
[This message has been edited by Randall Twede (edited August 07, 2001).]
[This message has been edited by Randall Twede (edited August 08, 2001).]