Jump to content

[SOLVED] restricting form submit


zohab

Recommended Posts

Plz try following example

 

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script language="javascript">
function validate(x){

if(x=="1"){
	alert(x);
	return false;
//	document.frmlogin.submit().disabled;
}

}
</script>
</head>

<body>

<form action="" method="post" name="frmlogin"><table width="200" border="1">
  <tr>
    <td> </td>
    <td><label>
      <input type="text" name="textfield" />
    </label></td>
  </tr>
  <tr>
    <td> </td>
    <td><label>
      <input type="submit" name="Submit" value="Submit" onclick="validate(1)" />
    </label></td>
  </tr>
</table>
</form>

</body>
</html>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.