Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 27th Nov 2015, 08:36 PM   #1
Wordsmith
War Room Member
 
Tsnyder's Avatar
 
Join Date: 2003
Location: , , USA.
Posts: 2,643
Thanks: 814
Thanked 1,734 Times in 834 Posts
Default
JavaScript Question
Share on: 
fb share twitter share gplus share more share

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...
Tsnyder is offline  
Unread 30th Nov 2015, 04:47 PM   #2
Active Warrior
 
2WDHost's Avatar
 
Join Date: 2011
Posts: 96
Thanks: 0
Thanked 26 Times in 25 Posts
Default
Re: JavaScript Question
Share on: 
fb share twitter share gplus share more share

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.
2WDHost is offline  
Unread 1st Dec 2015, 05:01 AM   #3
Warrior Member
 
Join Date: 2014
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
Default
Re: JavaScript Question
Share on: 
fb share twitter share gplus share more share

Originally Posted by 2WDHost View Post

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.
This is right.
But also a simple login script will suffice.
emuigai is offline  
Closed Thread


Bookmarks

Tags
javascript, question


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 03:55 PM.