|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
||||
|
||||
|
JavaScript - Submit form when text is entered
hello,
how can i post a form when text is entered into a text field. i really want it to submit when 6 characters are entered into the field.
__________________
Do one thing every day that scares you [eleanor roosevelt] www.webooktalent.com www.demosales.net www.topgearphotography.com
|
|
#2
|
||||
|
||||
|
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Auto-submit</title>
<script language="JavaScript">
function CheckLength(strValue) {
if (strValue.length >= 6)
{
document.forms[0].submit();
}
}
</script>
</head>
<body>
<form>
<input type="text" name="MyInputBox" maxlength="6" onKeyUp="javascript:CheckLength(this.value);">
</form>
</body>
</html>
__________________
selwonk |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > JavaScript - Submit form when text is entered |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|