Send return key event using script
|
07-20-2016, 05:22 AM
Post: #1
|
|||
|
|||
Send return key event using script
I have the following HTML form that I am trying to post to.
<div class="list-group"> <input name="username" type="text" placeholder="Username" class="form-control ng-pristine ng-untouched ng-empty ng-invalid ng-invalid-required" ng-model="login.credentials.username" required=""> <input name="password" type="password" placeholder="Password" class="form-control ng-pristine ng-untouched ng-empty ng-invalid ng-invalid-required" ng-model="login.credentials.password" autocomplete="off" required=""> </div> <button class="btn btn-lg btn-primary btn-block" type="submit" ng-disabled="form.$invalid || form.$pristine" disabled="disabled">Sign In</button> Basically the form above takes an two input fields and than has a submit buttom. The problem is that the submit button is initially greyed out until input is entered in both inputs. The onlyway I can get the submit button to be ungreyed is doing a keypress in each input. Is there a way to simulate keypress for the attributes username, and password. |
|||
07-21-2016, 09:15 AM
Post: #2
|
|||
|
|||
RE: Send return key event using script
So I did some research in javascript on my own and I did find a way to update my usecase.
The site that I work with includes jquery so I found this worked for me. $('input').change(); as an exec statement. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)