Jas
01-05-2007, 11:55 PM
Before I start, let me say that I know JS stinks as a security system for websites because it can be hacked into, but I am experimenting with it, as sort of a way to see what JS can do.
My idea is that users have a security card (such as a USB Drive with the JS file on it) that they plug in to unlock pages in the site. This process has proved to be complicated though--I have run into several problems.
First (simple problem but I didn't see it on the forum), how do you search an array? (i.e. var code= new array("01", "02", "03"), how do you search it for, say, a var named accessString?)
Second, how can I write to a external js file, and not only that but define where I want to write in that JS file? (i.e. write "01234" on lane 18, character 23 of keystart.js) Is that even possible?
Thanks!
My idea is that users have a security card (such as a USB Drive with the JS file on it) that they plug in to unlock pages in the site. This process has proved to be complicated though--I have run into several problems.
First (simple problem but I didn't see it on the forum), how do you search an array? (i.e. var code= new array("01", "02", "03"), how do you search it for, say, a var named accessString?)
Second, how can I write to a external js file, and not only that but define where I want to write in that JS file? (i.e. write "01234" on lane 18, character 23 of keystart.js) Is that even possible?
Thanks!