Hello i have website and i have one problem, the javascript is not working i dont know why So can anyoune help me please. My website is: rinikplex.gq
Can you check your browser console for any JavaScript errors? What is the JavaScript used for on your site. Do you use any JavaScript APIs? Please give more detail if you would like us to help you.
JavaScript is not working on your site because you don;t have any. There’s no JavaScript.
There is rinikplex.gq/password_page_protected/ in that folder
but its not in js folder
So where is it located? We can’t help if you don’t provide any detail.
rinikplex.gq/password_page_protected/index.js
and here is the html code:
Page Protected
Password:Your webpage is trying to load /password_page_protected/js/index.js
not /password_page_protected/index.js
and this is why it’s not working.
sorry i mean this one <script src="js/index.js" charset="utf-8"></script>
oh ok im going to edit this
You are trying to load a non-existent file with that code.
OK!
But the Javascript code is not working
That’s because you never actually call the passcheck()
function.
But im programming this with youtube tutorial
Are you sure you followed it? Because it would work if you changed your <form>
from this:
<form class="passform" action="webpage.html">
Password: <input type="password" required="" id="pass1">
<input type="submit">
</form>
to this:
<form class="passform" onsubmit="passcheck()" action="webpage.html">
Password: <input type="password" required="" id="pass1">
<input type="submit">
</form>
Notice the onsubmit="passcheck()"
!
yeah but its says Wrong Password, Try Again. and Correct Password. Click OK to enter Webpage. if i click Submit
You may not want to use JavaScript to check a password, it is super insecure. Consider using PHP, because it is available to you here.
Also, we are not here to solve simple errors on your site over and over again. As a developer, you should at least have those basic debugging skills.
Ok Thanks Have Nice New Year