dave Posted October 25, 2005 Share Posted October 25, 2005 Alright hers my delema: I'm building a password application to test my friends to see if they can crack the code. When they crack the code i want it to go to the second similar but harder application. I know some desent html and i'll show you the code i already have: <html><body><body bgcolor="lightblue"><h1 align="center"> Daves Password challenge.<form>Password: <input type="password" name="password" <value="1jkh34k"> </form><form><input type="button" value="Enter Password"></form><form> Thats the code i have but im not sure if i made the value for my password correctly. So if you can tell me were and how to input the href i would be thankful. Link to comment Share on other sites More sharing options...
actionsketch Posted October 25, 2005 Share Posted October 25, 2005 Here's what it should look more like: <form>Password: <input type="password" name="password" value="1jkh34k"> <input type="button" value="Enter Password"></form> although, setting the value to something seems kinda weird... if you want to check what password they entered in the box, you have to use either javascript or php. Link to comment Share on other sites More sharing options...
dave Posted October 25, 2005 Author Share Posted October 25, 2005 Oops. I noticed that when i wrote value it was missinterperated. What i meant was how do i set the correct password so that when you hit 'Enter Password' it will take you to my other page. Link to comment Share on other sites More sharing options...
Chocolate570 Posted October 27, 2005 Share Posted October 27, 2005 Here you go, if this is what you want. <html><head><script type="text/javascript">var password="put the password here"var secondurl="put the second url's location here. Remember the 'http's!"var message="put the congratulations message here."function checkPass(){if(document.forms.myForm[0].value=password){alert(message)window.location=secondurl}else{alert("Sorry, you didn't guess it! Try again!")}}</script></head><body bgcolor="lightblue"><form name="myForm"><input type="password"><input type="button" value="Submit" onclick="checkPass()"></form></body></html>The red parts are the parts that you can change. Link to comment Share on other sites More sharing options...
dave Posted October 27, 2005 Author Share Posted October 27, 2005 Thanks! And does anyone have any encrypted text for me to hide the password in to make it harder? Link to comment Share on other sites More sharing options...
Chocolate570 Posted October 27, 2005 Share Posted October 27, 2005 sure, first edit the values. Then go here:http://scriptasylum.com/tutorials/encdec/html_encoder.htmlFollow the instructions. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now