How can I submit information from my <input />
automatically? I wanted this automatic process to be controlled by the input field size. For example, when the value reaches 8 characters, it automatically sends and moves to another page. In this case my action="sucesso.php"
. I know this is possible using javascript but I do not know much about the language.
My code:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<?php include 'func.php' ?>
<link href="index.css" rel="stylesheet"></link>
<link href="../Login/css/hover.css"></link>
</head>
<body>
<div class="container">
<form method="Post" action="sucesso.php" name="form">
<div class="txtbox-container hvr-glow">
<input type="text" name="txtbox" placeholder="Número do Cartão" autofocus>
</div>
</form>
</div>
<p><label id="result"></label></p>
<script type="text/javascript">
document.form.submit()
</script>
</body>
</html>
I already have the script in code that automatically sends but does not have that field size control done.