Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


anupama
Error display
2 Answer(s)      2 years and 11 months ago
Posted in : JavaScript Questions


I want to give a message on the screen that an error has occured...but I dont want to use alert and give pop up box...any other solution for the problem?


Advertisement
View Answers

September 5, 2011 at 3:12 PM


<html>
<script>

function validate(){

var regExpObj = /(\d\d\d)-\d\d\d\d\d\d\d\d/;
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   var e = document.getElementById('email').value;
   var ph=document.getElementById('phone').value;

   if(reg.test(e) == false) {
      document.getElementById('lab1').style.visibility="visible";
      document.getElementById('email').value="";
      return false;
   }
 else if(regExpObj.exec(ph) == null){
      document.getElementById('lab2').style.visibility="visible";
        return false;
    } else {
     return true;
    }
}
</script>
<form id="form" method="post"  onsubmit="javascript:return validate();">
<table>
<tr><td>Email </td><td><input type="text" id="email" ><label id="lab1" style="visibility:hidden"><font color="red">*Invalid Email Address!</font></label></td></tr>
<tr><td>Phone Number:</td><td><input type="text" id="phone"><label id="lab2" style="visibility:hidden"><font color="red">*Invalid Phone Number!</font></label></td></tr>
<tr><td></td><td><input type="submit" value="Submit"></td></tr>
</table>
</form>
</html>


September 7, 2011 at 1:38 PM


Thnx...



Related Tutorials/Questions & Answers:
Error display
Error display  I want to give a message on the screen that an error has occured...but I dont want to use alert and give pop up box...any other solution for the problem
error display
error display  I am creating a web page...I have two textboxes and an add button. If nothing has been entered in the textboxes and if I click the add button , I have to get pop up box indicating that "please fill in the fields
Advertisements
Display error message if data is already inserted in database
Display error message if data is already inserted in database   Display error message if data is already inserted in database Pls help me Thanks
display error message for dupliacate record in properties file
display error message for dupliacate record in properties file  This is my code. Here if the properties file contain duplicate records(i.e.)more than one entry e.x.001,002,003,001 i want to display the error message "Duplicate
this code will be problem it display the error again send jsp for registration form
this code will be problem it display the error again send jsp for registration form  I AM ENTERING THE DETAILS OFTER IT DISPLAY THE ERROR PLEASE RESEND THE CODE org.apache.jasper.JasperException: java.lang.NumberFormatException
this code will be problem it display the error again send jsp for registration form
this code will be problem it display the error again send jsp for registration form  I AM ENTERING THE DETAILS OFTER IT DISPLAY THE ERROR PLEASE RESEND THE CODE org.apache.jasper.JasperException: java.lang.NumberFormatException
Display a dialog box with Java Error
Display a dialog box with Java Error   ... you a code that help you in implementation of dialog box with Java Error... the execution of a program using javaw ,the program code display a dialog box name Java
display
display  please tell me how to display the content from database.. if we click on any image using servlets/jsp...please
error
error  while iam compiling iam getting expected error
error
; phone=ph; ss=s; mos=ms; } public void display..."+it); } } this is my program i am getting an error saying cannot find symbol class string...; } public void display() { System.out.println("Name"+name+"\naddress
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
/ServletUserEnquiryForm.shtml getting an error given below SQLException caught: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error please suggest
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
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  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
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  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
How to create and use custom error page in jsp
and use custom error page in jsp and display an error message. Before run... How to create and use custom error page in jsp...;   error_page.jsp <!DOCTYPE HTML PUBLIC "-//W3C//DTD
Display Tag
Display Tag  Hi Here is My code, There is problem At line no.3, where i want to display two fields in one column but it gives error.. Please any one knows the solution must reply Thanks In Advance
Display Tag
Display Tag  Hi Here is My code, There is problem At line no.3, where i want to display two fields in one column but it gives error.. Please any one knows the solution must reply Thanks In Advance
php display errors
php display errors  i don't know how to display the error using PHP
error message
error message  Sir i make one form facility with insert,update,delete.i want to error msg if any type of the data is missing and display in error msg which of the data is misssing
Image display in pdf
Image display in pdf  i am trying to display a image in pdf using xsl fo but " [ERROR] Error while creating area : Error with image URL: images...) and no base URL is specified " error is displayed.Please help me......   Please
Display Problem
Display Problem  i am creating a small window application , i want to fetch data from ms-access(db) and want to display it on tables. what options are there to show result on table. is CSS helpfull
Display data
Display data  after successful login how i can fetch my account information from sql database
how to display?
how to display?  How to write a select query for displaying data where i have author as multivalued attribute
how to display?
how to display?  How to write a select query for displaying data where i have author as multivalued attribute
how to display?
how to display?  How to write a select query for displaying data where i have author as multivalued attribute
display result
display result  i want a code that takes input from user through dropdown box and display the result into table.all the values regarding the user input must be displayed. i am using mysql database   hi i want study
image display
image display  sir the answer which you have sent to me is already I have I want to know that the syntax which you have writen for display... to display in image from databse plz help me i will wait for ur reply
Display Information
Display Information  I have a listbox having many names and I have a button "display". I select some names and when I click the button , the names along with the address(they are in database) should be displayed. I am using php
display shapes
display shapes  Hi, I would like to see geometric shapes like square, triangle, circle, rectangle as my outputs. Also, those figures shouldn't overlap while they get displayed. Please help me
profile display
profile display  Search page to display matching results in JSP and Servlet   Please visit the following links: http://www.roseindia.net/servlets/search.shtml http://www.roseindia.net/jsp/user-search.shtml
Retina Display
Retina Display  is it possible to test Retina Display on simulator?   Yes, run the application from Xcode, when the simulator opens go to Hardware->Device->iPhone 4 That will now have a 2x screen resolution
image display
image display  sir the answer which you have sent to me is already I have I want to know that the syntax which you have writen for display... to display in "div image from databse /div" plz help me i will wait for ur reply
Display Configurations
Display Configurations   The year is 2136. A lot of things have changed but BITS Pilani still exists. The display technology used now is a WASDLED screen. This display technology consists of a configuration matrix containing
profile display
profile display  how to display matching Results using jsp-servlet?   Please visit the following links: http://www.roseindia.net/servlets/search.shtml http://www.roseindia.net/jsp/user-search.shtml http
profile display
profile display  how to display matching jobs in jobseeker's profile using jsp-servlets?   Please visit the following links: http://www.roseindia.net/servlets/search.shtml http://www.roseindia.net/jsp/user
portlet display
. if any error you can see the server console
 

 

 

DMCA.com