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. }