<html>
<head>
<title>(Type a title for your page here)</title>
<style type="text/css">
div {
position: absolute;
left: 10px;
top: 40px;
background-color: #f1f1f1;
width: 280px;
padding: 10px;
color: black;
border: #0000cc 2px dashed;
display: none;
}
</style>
<script language="JavaScript">
function setVisibility(id, visibility) {
document.getElementById(id).style.display = visibility;
}
</script>
</head>
<body >
<form action='test3ck.php' method='POST' >
<input type=radio name=type value='male' onclick="setVisibility('sub3', 'inline');setVisibility('sub4','none');";>Contact Details <input type=radio name=type value='female' onclick="setVisibility('sub3', 'none');setVisibility('sub4','inline');";>Contact Form
<div id="sub3"><b>Contact Details</b><br>
First Name: <br>
Street Address:<br>
City:<br>
Zip:<br>
State:<br>
Country
</div>
<div id="sub4" ><b>Contact Form</b><br>
Name<input type=text name=sname><br>
Email<input type=text name=email><br>
<textarea name=dtl rows=3 cols=25></textarea><br>
<input type=submit >
</div>
<br></form>
</body>
</html>
sanjeev sajal | 17-03-2010 |
this so helpful me all time. |
Preethi | 06-05-2010 |
when focus is on textbox,a msg will display and also perform validation using onblur |
safeer | 14-04-2015 |
Thanks these all are very good and most helpful for every body! |