This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<script language="javascript">
function validate(){
var name=document.form.name.value;
var city=document.form.city.value;
var category=document.form.category.value;
var email=document.form.email.value;
var phone=document.form.phone.value;
var mobile=document.form.mobile.value;
var fax=document.form.fax.value;
var state=document.form.state.value;
var contactperson=document.form.contactperson.value;
var website=document.form.website.value;
var govcernumber=document.form.govcernumber.value;
var estayear=document.form.estayear.value;
var ranking=document.form.ranking.value;
var timings=document.form.timings.value;
var address=document.form.address.value;
var pattern = /^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/;
if(name==""){
alert("Enter Username!");
return false;
}
if(city==""){
alert("Enter city!");
return false;
}
if(category==""){
alert("Enter category!");
return false;
}
if (pattern.test(email)) {
alert("Please enter a valid email Id");
return false;
rajendar talatam wrote:please change the code to validate email
Rajendar, when you ask for help in forums which are volunteer driven, you are expected to ShowSomeEffort in asking your question. Your post doesn't even explain the issue you are running into. Dumping random HTML or other code and asking others to change it to get it working isn't the right way to ask for help. If you really do need help, please take some time to add more details about the issue you are running into and form a proper question. Also while posting code, logs, xml content or other similar content, please use the code blocks to wrap that text (you can use the Code button in the message editor window and also the Preview button to see it's properly formatted).