hi... i have written the code like this ..and i got it....thankyou very much.
<form name="test" action="2.html" method=post onsubmit=" return funct();">
<input type=text name=z >
<br>
<input type=submit value=submit>
<script language="javascript">
function funct( )
{
if (document.test.z.value=="")
{
window.alert("please fill the details ");
return false;
}
return true;
}
Regards
Dinesh.N

