javascript - Redirect html when fill the input sucess -
i using form connector server in order when put correct user , password connects form of web , redirects ip when put wrong password or wrong user dont want redirect stay in same page.
<div class="container"><!-- container --> <div class="row"><!-- row --> <div class="col-md-4"></div> <div class="col-md-4"><!-- col 3 --> <form class="login" autocomplete="off" method="post" action="http://139.59.200.233:8080/track/track"> <h5>servidor 1</h5> <h2 class="title">acceso plataforma gps</h2> <input id="accountloginfield" type="hidden" value="occidentegps" name="account" required> <input type="text" name="user" placeholder="usuario" autofocus required/> <i class="fa fa-user"></i> <input type="password" name="password" placeholder="contraseña" required /> <i class="fa fa-key"></i> <button> <i class="spinner"></i> <span class="state">iniciar sesiÓn</span> </button> </form> </div><!-- col 3 --> <div class="col-md-4"></div> </div><!-- row --> </div><!-- container -->
the user always redirected when using html form submission. way check if credentials correct before redirecting user submit form data using javascript (xhr, ajax, or fetch).
Comments
Post a Comment