Guest User

Untitled

a guest
Jan 17th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. // get configuration fields from back panel
  2. var usernameField = document.getElementById("username");
  3. var username = usernameField.value;
  4. var passwordField = document.getElementById("password");
  5. var password = passwordField.value;
  6.  
  7. // clear status
  8. var statusArea = document.getElementById("statusArea");
  9. var status = document.getElementById("content");
  10. status.innerText = "";
  11. statusArea.object.refresh();
  12.  
  13. if ( !username || !password) {
  14. status.innerText = "ERROR: Must enter username and password on back panel!";
  15. alert("Must enter username and password on back panel!");
  16. }
  17.  
  18. if (username && password) {
  19. status.innerText = "Connecting as "+username;
Add Comment
Please, Sign In to add comment