salim
The Unix error
1 Answer(s)      11 months ago
Posted in : Java Beginners

var a=document.check.username.value; if(a=="" ) { alert("Enter a valid UserName"); return false; } if(!isNaN(a) ) { alert("Enter a valid UserName"); return false; } var b=document.check.password.value; if(b=="") { { alert("Enter password"); return false; } }

View Answers

May 28, 2012 at 12:59 PM


The given code allow the user to enter username and password.It will show an error message if user leave the fields blank.

<script>
function validate(){
var a=document.form.username.value; 
if(a=="" ) {
alert("Enter a valid UserName");
return false; 
}
if(!isNaN(a) ) 
{
alert("Enter a valid UserName");
return false;
}
var b=document.form.password.value;
if(b=="") {
{

alert("Enter password"); 
return false; 
} 
}
}
</script>
<form name="form" method="post"  action="" onsubmit="return validate();">
  <table>
  <tr>
    <td>Username:</td>
    <td><input type="text" name="username"></td>
  </tr>
  <tr>
    <td>Password:</td>
    <td><input type="password" name="password"></td>
  </tr>
  <tr>
  <tr>
  <td></td>
  <td>
  <input type="submit" value="Submit" name="addproduct"/>
  </td>
  </tr>
</table> 
</form>









Related Pages:
The Unix error
The Unix error  var a=document.check.username.value; if(a=="" ) { alert("Enter a valid UserName"); return false... will show an error message if user leave the fields blank. <script> function
unix
unix  not able to download java into unix os
unix
unix  hai friends, I am new to to java with unix.can you any one tell me ho to work unix in windows xp.i search in net,it will show the aludra.usc.edu.how can i install this? thanks
unix/ubuntu os
unix/ubuntu os  how to find jdk path in unix through terminal any command
unix programming - Development process
unix programming  write a c program that stimulates 'ls" command
unix program - UML
unix program  sorry there is no unix category i slected uml 1.write a c shell script on links? 2.write a c shell that stimulates the fork? 3.write a c shell that stimulates the umask? 4.write a c shell that stimulates
UNIX - Java Beginners
UNIX  Dear Sir, Kindly send some important points/notes in UNIX since I have taken the exam pertains to UNIX, so that it will be very helpful..., Unix: The UNIX operating system was developed at AT&T Bell Laboratories
Linux and Unix Books
Linux and Unix Books       Page-1 UNIX is a very stable and very powerful operating system. This tutorial assumes you have access to either a Linux or UNIX shell
JBoss Unix and Line Separator
JBoss Unix and Line Separator  Hi, I am trying to solve an critical problem. I have an application which write a batch file using the method println... separator from O.S. \n on unix, but I am trying to change to \r\n. I change
Connecting to Unix through Java - JavaMail
Connecting to Unix through Java  Could you please tell a sample code, where i connect to the unix server and run a script and write the results in a file and mail that file back to me
Linux and Unix Books
Linux and Unix Books       Page-1 UNIX is a very stable and very powerful operating system. This tutorial assumes you have access to either a Linux or UNIX shell
Linux and Unix Books page3
Linux and Unix Books page3       Introduction of Unix operating system UNIX is an operating... and laptops. The kernel of UNIX is the hub of the operating system
Linux and Unix Books page1
Linux and Unix Books page1       Introduction of Basic Linux Commands UNIX is a very stable... a Linux or UNIX shell account. We are going to connect via our windows
Linux and Unix Books page1
Linux and Unix Books page1       Introduction of Basic Linux Commands UNIX is a very stable... a Linux or UNIX shell account. We are going to connect via our windows
Unix Web Hosting
Unix Web Hosting Unix Web Hosting is the type hosting provided on the Unix Servers. Unix Web Hosting is very reliable hosting option. Unix Hosting.... UNIX web hosting and Linux web hosting are the most powerful and reliable hosting
Where i can use UNIX Operating System?
Where i can use UNIX Operating System?  Where i can use UNIX Operating System
Linux and Unix Books page2
Linux and Unix Books page2       Network programming under Unix systems  This document..., with the knowledge necessary to write Unix programs that use the network
Java code to run unix command - Java Beginners
Java code to run unix command  Hi, I need a java code to connect to a remote unix server and run a unix command. Please help. Regards, Pratyush
Unix and Perl Programmer
Unix and Perl Programmer       Position Vacant: Unix and Perl Programmer  Job Description  We are looking for Perl Programmers with Unix experience
Java compilation error - Java Beginners
Java compilation error  hai, now only i have started to work with java.I have been given a task as execute unix codes using eclipse.But i dont know the source codes.Please help me to start the program... Regards, R.Punitham
Linux and Unix Books page7
Linux and Unix Books page7       System Maintenance and Upgrades As computers become more ubiquitous in large corporate, government, and academic organizations, the total cost
in unix which command is used to create files
in unix which command is used to create files  in unix which command is used to create files   The cat command in UNIX can be used to create and display information from a file. Command to create a file % cat >
Linux and Unix Books page4
Linux and Unix Books page4       The Kernel Extensions without Run-Time Checking  In this paper we address the problem of how an operating-system kernel or a server
error
error  while iam compiling iam getting expected error
Linux and Unix Books page5
Linux and Unix Books page5       Using the Strategy Design Pattern  This paper presents how the Strategy pattern has been used to build BAST, an extensible object-oriented
Linux and Unix Books page6
Linux and Unix Books page6       An Analysis of Internet Content Delivery Systems Few things compare with the growth of the Internet over the last decade, except perhaps its
Error-
Error-   Hello, I would like to know about XSD file. I try to print XML file but I am getting error SAXException-- says Content is not allowed in prolog. Please help me
error
error  i have 404 error in my program plz tell me yhe solution about
error
error  i have 404 error in my program plz tell me yhe solution about
Error
Error  I have created ajax with php for state and city. When I change state then city will not come in dropdown list and it give me error as 'Unknown Runtime Error'. This error come only in IE browser, but in other brower
error
error  java.lang.unsupportedclassversionerror:bad major version at offset 6 how to solve this????   Hi, Please check the version of framework used and also the JDK version. This type error also comes when java file
error
error
error
error  When I deploye the example I have this message cannot Deploy HelloWorld Deployment Error for module: HelloWorld: Error occurred during deployment: Exception while deploying the app [HelloWorld
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern = /^\d{3,5
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
error
"+it); } } this is my program i am getting an error saying cannot find symbol class string
error
error  whats the error.............. import java.util.Scanner; public class g { public static void main(String[] args) { Scanner s=new Scanner(System.in); int d,x,y; System.out.println("Enter the first number
Linux and Unix Books page3
Linux and Unix Books page3       Introduction of Unix operating system UNIX is an operating... and laptops. The kernel of UNIX is the hub of the operating system

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.