Password HTML Script - Post ID 298321
I created the following HTML for a password box with some validation.
<html>
<head>
<title>Password</title>
<script>
function checkPassword() {
var password = document.getElementById("passwordBox");
var passwordText = password.value;
if(passwordText == "FarmTronics") {
return true;
}
alert("Access denied! Incorrect password!");
return false;
}
</script>
</head>
<body>
<p style="font-size: 30pt;">FarmTronics Australia</p>
<p>Please enter the password to view this website.</p>
<p>Password:<input id="passwordBox" type="password"/></p>
<a href="https://farmtronics.com.au" onclick="return checkPassword();">
Click here to submit password and view website
</a>
</body>
</html>
But when i paste it into a HTML Element in WFB it changes to the following:
And i cannot figure out why this is happening ??
<p style="font-size: 30pt;">
FarmTronics Australia
</p>
<p>
Please enter the password to view this website.
</p>
<p>
Password:<input id="passwordBox" type="password"></input>
</p> <a href="https://farmtronics.com.au" onclick="return checkPassword();">Click here to submit password and view website</a>
<html>
<head>
<title>Password</title>
<script>
function checkPassword() {
var password = document.getElementById("passwordBox");
var passwordText = password.value;
if(passwordText == "FarmTronics") {
return true;
}
alert("Access denied! Incorrect password!");
return false;
}
</script>
</head>
<body>
<p style="font-size: 30pt;">FarmTronics Australia</p>
<p>Please enter the password to view this website.</p>
<p>Password:<input id="passwordBox" type="password"/></p>
<a href="https://farmtronics.com.au" onclick="return checkPassword();">
Click here to submit password and view website
</a>
</body>
</html>
But when i paste it into a HTML Element in WFB it changes to the following:
And i cannot figure out why this is happening ??
<p style="font-size: 30pt;">
FarmTronics Australia
</p>
<p>
Please enter the password to view this website.
</p>
<p>
Password:<input id="passwordBox" type="password"></input>
</p> <a href="https://farmtronics.com.au" onclick="return checkPassword();">Click here to submit password and view website</a>
Hi Lou,
Don't use the html, head ,title, and body tags in your html element.
Don't use the html, head ,title, and body tags in your html element.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Wow Eric,
That was an easy fix, i bow to the master once again.
That was an easy fix, i bow to the master once again.
Lou Mitsy wrote:
Wow Eric,
That was an easy fix, i bow to the master once again.
Wow Eric,
That was an easy fix, i bow to the master once again.

Glad to help.

I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Thanks again Eric,
It would be easier if WFB had a few more options for the Password Element.
Including the validation and the actual password, rather than just asterisks.
Maybe in the future.
It would be easier if WFB had a few more options for the Password Element.
Including the validation and the actual password, rather than just asterisks.
Maybe in the future.
I think CC has kept it simple because it's not a secure way of using passwords.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Yes, that makes sense.
Thanks again Eric.
Thanks again Eric.
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.