8 replies
by quahsays
not exactly sure of your qn, but, to write HTML pages using notepad requires you to be proficient in the html tags, and one way to learn is to use tool like frontpage, create the frameset, and learn the tags from there.
normal HTML is not meant for such controls as in password. You would need a script, and maybe a database to control. for Windows NT/W2k, you can of course use the ACL to control, but surfer requires IE to work.
by imran16
by al_<al
Here's a really good ref. for frames:
http://www.w3schools.com/html/html_frames.asp
As for the password, let's look at their example:
-----
--name--->
notice I've given a name attribute to the second element in the frameset.
(BTW, pretend the dashes are white space)
Let's say frame_a.htm has a form button that, when clicked, loads secret.htm. You could add a simple password with Javascript to the button:
by imran16
by al_<al
Is this SECURE? Absolutely not. View source and you've cracked it. Could you make it a tad more secure? Sure. Store the script in a file named secret.js, link it within the button page, and call the function within the button definition:
The function declaration in secret.js might look like this:
function check4secret() {
var theWord = prompt('What\'s the password?','')
if(theWord && theWord == 'alakazam'){
parent.main.location='secret.htm'
} else if(theWord){
alert('That\'s not the word!!\n\nTry again')
check4secret()
}
}
by imran16
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending