File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes UserID Validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "UserID Validation" Watch "UserID Validation" New topic
Author

UserID Validation

Michael.H.Sun
Ranch Hand

Joined: Jan 18, 2001
Posts: 39
Dear Friends,
Can anyone there tell me how to do the following with javascripts:
 If login id/password combination does not match database, then display message �Login ID or Password incorrect. Please enter valid Login ID and Password.�
 If login id/password combination does match database, then re-direct user to home.asp.
Thanks.
Michael H. Sun
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
There are a lot of different ways to achieve what you are talking about. Could you answer a few things first?
1) Is this an internet or an intranet application?
2) If intranet, is there a targeted browser?
3) Are you using an n-tier architecture?
4) What technology are you using to script the server?
5) What technology are you using to script the client?
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4339
    
    2

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).]


SCJP
Visit my download page
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
There is at least one client-side data access technology that I am aware of, but it is MS-only. It's called RDS (Remote Data Services) and it allows a developer to access COM components or databases from JavaScript on the client-side. However, as this only works with IE5.0 and above and MDAC 2.1 and above, it isn't a good solution for the internet. Which brings me back to this question:
Is this application internet or intranet?
RDS is pretty simple to implement if the environment is right. Otherwise, you are looking at ASP/JSP/CGI/Perl to access information in a database.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
There is at least one client-side data access technology that I am aware of, but it is MS-only. It's called RDS (Remote Data Services) and it allows a developer to access COM components or databases from JavaScript on the client-side. However, as this only works with IE5.0 and above and MDAC 2.1 and above, it isn't a good solution for the internet. Which brings me back to this question:
Is this application internet or intranet?
RDS is pretty simple to implement if the environment is right. Otherwise, you are looking at ASP/JSP/CGI/Perl to access information in a database.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UserID Validation
 
Similar Threads
Result set
Login code problem
Tomcat 7 : JSESSIONID not being sent to client
88% on Part II/III (SCEA Beta)
How to configure Tomcat for authentication against Active Directory of Windows Server 2003