Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-15-2006, 11:33 AM   PM User | #1
toxicano
New to the CF scene

 
Join Date: Dec 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
toxicano is an unknown quantity at this point
Question Security cookie and cookie checker.

This is pretty hard what I'm about to ask...

But, bear with me...


Question:

I am using a javascript password protection script to allow users access into my website, the script checks a .js file on the index page for the user names and passwords and see if they match to allow access, if the name and pass are correct and are there the script allows the user to be directed to the homepage of the site, if the name and pass are incorrect or do not exist the script doesn't redirect them into the page. I have the end of the code in the .js file here:

// Your other commands here
}window.location = "http://www.toxicseduction.com/home.htm"; [This is what happens when the name and pass are correct]
}
}
}


I am looking for a command to add above the redirect command that will leave a cookie for the users who have the correct name and pass.

After the cookie is left they will be redirected instantly,

but now I want a script for the homepage that the registered users were redirected to that will check to see if the cookie is there, and if it isn't they won't be able to see the content on the page.

Does anyone know what I need to do this?

Note: I will be encrypting the index page so that guests don't see the location of the .js file in the source and i will also be having the cookie placed on another site but loaded from my main site so that it's not saved when users choose to save my site so they got no idea of getting in.

Can anyone help me here?

Copyright for this question by Jose Contreras 2006.

Last edited by toxicano; 12-15-2006 at 11:36 AM..
toxicano is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 11:02 PM.


Advertisement
Log in to turn off these ads.