| | #1 |
| Wordsmith War Room Member Join Date: 2003 Location: , , USA.
Posts: 2,643
Thanks: 814
Thanked 1,734 Times in 834 Posts
|
I want to put some training videos on a password protected page. Total security isn't a factor because this is free training. My company simply requires that I put it behind a password becasue we use certain examples and terminology that would be inappropriate to the general public. I'm not even close to being a JavaScript expert... does this look right to you? <script language= "JavaScript"> var password; var pass1= "password"; password=prompt('Enter Password' , '); if (password=pass1) alert (correct password, 'Click OK To Enter.'); //--> </script> I just paste this into the page, right? Do I have to designate an alternative page if they enter an incorrect password? Thanks for your time and assistance! |
| If you knew what I know you'd be doing what I do... | |
| |
| | #2 |
| Active Warrior Join Date: 2011
Posts: 96
Thanks: 0
Thanked 26 Times in 25 Posts
|
Hi Tsnyder. The quick, easy and relatively secure solution for you should be to put your page and videos into separate directory and password protect it with .htaccess for example. What control panel do you use for your site hosting? You can search for a folder password protect option there. Feel free to ask if you need assistance with this. |
| 2WDH.com: Professional cPanel Hosting since 2003 Really helpful support. You're not a number to us! Programming, database and site development help. No overselling. SSD. Real 99.99%+ uptime. Free 2-week trial: no obligation/credit card required. | |
| |
| | #3 | |
| Warrior Member Join Date: 2014
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
|
But also a simple login script will suffice. | |
| |
|
| Bookmarks |
| Tags |
| javascript, question |
| |