This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 14th, 2012  |  syntax: None  |  size: 0.63 KB  |  views: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. document.location.href = "...login page...";
  2.        
  3. var userInput = confirm('Session timed out, nt login again?');
  4. document.location.href = (userInput === true ? 'loginpage' : 'index/main.html');
  5.        
  6. var userInput = confirm('Session timed out, nt login again?');
  7. document.location.href = (userInput ? 'loginpage' : 'HOME');
  8.        
  9. if (userInput)
  10. {
  11.     document.getElementById('loginNameInputId').focus();//fill in actual id, of course
  12. }
  13. else
  14. {
  15.     window.location.href = 'anyPage or url';
  16. }
  17.        
  18. if (userInput)
  19. {
  20.     document.getElementById('loginNameInputId').value = varContainingUserName;
  21.     document.getElementById('passwordInput').focus();
  22. }
clone this paste RAW Paste Data