Develop a web page using servlet to display your profile.

QuestionsDevelop a web page using servlet to display your profile.
akankshat.ngPublished on: 10/18/2018 5:24:53 PM

 Develop a web page using servlet to display your profile. Make necessary assumptions.  


1 Answers
Best Answer 0
admin 10/9/2018 12:56:00 AM

<pre><code><html>

<head>

<title>anyform</title>

<script language="javascript">

function validation()

{

if(document.getElementById("fname").value=="")

{

alert("Please enter valid name");

document.getElementById("fname").focus();

return false;

}

if(document.getElementById("lname").value=="")

{

alert("Please enter valid name");

document.getElementById("lname").focus();

return false;

}

if(document.getElementById("emid").value=="")

{

alert("Please enter E-mail id ");

document.getElementById("emid").focus();

return false;

}

return true;

}

</script>

</head>

<body>

<fieldset>

<legend><h1>REGISTRATION FORM</h1><legend>

<form name="anyform"method="post"action="profilehtml"onsubmit="return validation();">

<table border="2px"style="width:400px;color:blue;font-size:10px;text-align:centre">

<tr>

<td>FIRST NAME</td>

<td><input type="text"name="first name" id="fname"/></td>

</tr>

<tr>

<td>LAST NAME</td>

<td><input type="text"name="last name" id="lname"/></td>

</tr>

<tr>

<td>DATE OF BIRTH</td>

</tr>

<td>

<Date>

<select>

<option>dd</option>

<option value="0">01</option>

<option value="1">02</option>

<option value="2">03</option>

<option value="3">04</option>

<option value="4">05</option>

</select>

<Month>

<select>

<option >mm</option>

<option value="0">01</option>

<option value="1">02</option>

<option value="2">03</option>

<option value="3">04</option>

<option value="4">05</option>

</select>

<Year>

<select>

<option >yyyy</option>

<option value="0">1990</option>

<option value="1">1991</option>

<option value="2">1992</option>

<option value="3">1993</option>

<option value="4">1994</option>

</select>

</td>

</tr>

<tr>

<td>email ID</td>

<td><input type="text"name="email ID" id="emid"/></td>

</tr>

<tr>

<td>EMPLOYMENT STATUS</td>

<td><input type="radio" name="Employment Status" value="YES" />YES||

<input type="radio" name="Employment Status" value="NO" />NO</td>

</tr>

<tr>

<td>LOCALITY</td>

<td>

<select>

<option value="0">Metropolitan</option>

<option value="1">Urban</option>

<option value="2">Semi-Urban</option>

<option value="3">Rural</option>

</select>

</td>

</tr>

<tr>

<td>PASSWORD</td>

<td><input type="password" name="PASSWORD"/></td>

</tr>

<tr>

<td></td>

<td><input type="submit" name=" submit" value="submit" onclick="validation()" /></td>

</tr>

</table>

</form>

</fieldset>

</body>

</html></code></pre>

Edit