I am getting the problem saying "http" is not a registered protocol
while using th following script:
http://www.dynamicdrive.com/dynamicindex9/password.htm
what should i do to use it on the net.
Thanks
I am getting the problem saying "http" is not a registered protocol
while using th following script:
http://www.dynamicdrive.com/dynamicindex9/password.htm
what should i do to use it on the net.
Thanks
Are you using PHP or ASP?
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
No,
What i want to say is that, i want to password protect my page(trying as example)
http://www.angelfire.com/empire2/fun.../thankyou.html
(window.location=password+"http://angelfire.com/empire2/funnyland/thankyou.html")
the script is at another site.
and the password is 'silas' but as i enter the password, there is a prompt saying:
'silashhtp' no a registered protocol .
I think that, the script is not meant for entering full url.And will only work wth
*.html.
And the password should be as such that it should be a name of my destination page(thankyou.html) in this case my password should be thankyou.
Is it Right ?
Very close, try this if you are still having trouble:and then the name of the page should be (using the password in your post):Code:window.location="http://angelfire.com/empire2/funnyland/"+password+"thankyou.html"
silasthankyou.html
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
I did as you said but all in vain.
my script is at:
http://www.angelfire.com/empire2/fun.../password.html
password.html is the name of the file.
I have renamed the file as silasthankyou.html.but now as i enter the password ,
the browser takes me no where & drops me in to the same page after re-loading with the address:
http://www.angelfire.com/empire2/fun...assword2=silas
I even forgot to tell you that i had modified the script and removed the username option from the script
the script looks like this :
Do also tell me whether the form name "password1" and the input name"password2" can create any problem.Code:<html> <body> <script> //Encrypted Password script- By Rob Heslop //Script featured on Dynamic Drive //Visit http://www.dynamicdrive.com //http://www.dynamicdrive.com/dynamicindex9/password.htm function submitentry(){ password = document.password1.password2.value.toLowerCase() //username = document.password1.username2.value.toLowerCase() passcode = 1 //usercode = 1 for(i = 0; i < password.length; i++) { passcode *= password.charCodeAt(i); } /*for(x = 0; x < username.length; x++) { usercode *= username.charCodeAt(x); }*/ //CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD if(passcode==14547235500) //CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD { window.location="http://angelfire.com/empire2/funnyland/"+password+"thankyou.html" else{ alert("Password is Incorrect")} } </script> <form name="password1"> <strong>Enter password: </strong> <input type="password" name="password2" size="15"> <input type="button" value="Submit" onClick="submitentry()"> </form> </body> </html>
Not sure what the problem was but, here is one solution:
Works here.Code:<script> //Encrypted Password script- By Rob Heslop //Script featured on Dynamic Drive //Visit http://www.dynamicdrive.com function submitentry(){ password = document.password1.password2.value.toLowerCase() username = document.password1.username2.value.toLowerCase() passcode = 1 usercode = 1 for(i = 0; i < password.length; i++) { passcode *= password.charCodeAt(i); } for(x = 0; x < username.length; x++) { usercode *= username.charCodeAt(x); } //CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD if(usercode==134603040&&passcode==14547235500) //CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD { window.location="http://angelfire.com/empire2/funnyland/"+password+"thankyou.html" } else{ alert("Invalid Password!")} } </script> <form name="password1"> <input type="hidden" value="john" name="username2"> <strong>Enter password: </strong> <input type="password" name="password2" size="15"> <input type="button" value="Submit" onClick="submitentry()"> </form>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Not working yet.
By the way thanks for replying .I'll try somme other password scripts.
THANKS
Bookmarks