Jump to content

password protect a toggle (hide/show) element function

Jim Tavolaro

Recommended Posts

I'm trying to work out how to require a password when someone toggles an element on.

I use the methods describe here in https://www.w3schools.com/howto/howto_js_toggle_hide_show.asp to set up the toggle... but I want to require a password to display the element.  

I can't for the life of me work out how to integrate the password piece.

I tried using .htaccess and .htpasswd to protect the page, but that's not working too well.



Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...