JavaScript JavaScript Password check and Open .html file if correct javascript password check,javascript password check strength,javascript password check

I need to open a .html file upon password being entered correctly, the file is in the same folder. I have gotten most of it to work but it now says that my password function is not a function. Any help would be much appreciated

my code-

<html>

<head>
<title>Login</title>

</head>

<body onLoad="SetTime()">
<form name="form1">
<label for="password">Enter Password</label>
<input type="password" name="Password" id="password">
<input type="button" onClick="Password()" value="Submit" id="btn"> 
</form>
<script>

var password = "JavaScript";
var userInput = document.getElementById("password").value;
function SetTime()
{
  setTimeout("closeWindow()",120000);

}

function closeWindow(){
window.close();

}

function Password() {

if (userInput == "JavaScript") {
    window.open("file:///outcome 3.html")

    }
    }

</script>


</body>

</html>
Answer:1

First. I hope you know this is not secure. Second, your issues is the fact that your element id/name and function names are the same. Change one of them.

Third, you only read the value when the page is loaded. It does not magically get updated, you need to read the value of the textbox inside of the function.

Answer:2

I have a web design question that I'm trying to puzzle out. Essentially I'm looking to design a navbar such that it will change what buttons/links are displayed in the navbar based on what type of ...

I have a web design question that I'm trying to puzzle out. Essentially I'm looking to design a navbar such that it will change what buttons/links are displayed in the navbar based on what type of ...

I have a common header for all of the pages I have in my site. When I click on any link it takes me to that page and the page gets refreshed. But the header is the same as it was in the previous ...

I have a common header for all of the pages I have in my site. When I click on any link it takes me to that page and the page gets refreshed. But the header is the same as it was in the previous ...

  1. change active link color css
  2. change active link color
  3. change active link when scrolling
  4. change active link color css bootstrap
  5. change active link color bootstrap
  6. change active link in navbar
  7. change active link color javascript
  8. change active link color divi
  9. change active link jquery
  10. change active link
  11. change active link html
  12. change link color active page css
  13. html change active link color
  14. change color active link using jquery
  15. bootstrap change active link
  16. change link color on active page
  17. css change active link
  18. bootstrap navbar change active link
  19. bootstrap navbar change active link color
  20. change background color active link css

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script> var siteTitle = $.ajax({ url: 'http/', type: 'POST', ...

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script> var siteTitle = $.ajax({ url: 'http/', type: 'POST', ...

  1. make javascript load faster
  2. javascript load image faster

I have a page which has 2 text areas and wanted to validate each text area if the characters being typed is more than max length upon clicking submit button. Problem with the code below when clicking ...

I have a page which has 2 text areas and wanted to validate each text area if the characters being typed is more than max length upon clicking submit button. Problem with the code below when clicking ...

  1. jquery validation multiple textarea