anton_1 Posted March 24, 2012 Share Posted March 24, 2012 is there any way to submit a form without using a submit button? I want the form to post after the user has entered a certain amount of charaters? maybe using javascript? Any help is appreciated Ant Quote Link to comment https://forums.phpfreaks.com/topic/259625-automatic-login-after-input/ Share on other sites More sharing options...
dragon_sa Posted March 24, 2012 Share Posted March 24, 2012 not a php question but here you go this example is set to 10 characters <script type="text/javascript"> function check(){ var text = document.getElementById('test'); if (text.value.length == 10) { document.forms["myform"].submit(); } } </script> <form id="myform" method="post" action="process.php"> test: <input name="test" id="test" type='text' onkeyup="check()"> </form> Quote Link to comment https://forums.phpfreaks.com/topic/259625-automatic-login-after-input/#findComment-1330736 Share on other sites More sharing options...
anton_1 Posted March 24, 2012 Author Share Posted March 24, 2012 life saver mate! thank you Quote Link to comment https://forums.phpfreaks.com/topic/259625-automatic-login-after-input/#findComment-1330775 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.