...

View Full Version : Login Scripts.........



Lawn Gnome
07-13-2005, 07:50 PM
is there javascript/html login scripts? i know there is php but i dont want to bother with that. i know u can make protected pages but im taking about login scripts.

Ranger56
07-13-2005, 08:15 PM
Well, PHP is the way to go becuase javascript passwords can be very easily found out, you just need to view the source of the page/.js file and it says the password right in it.

[m] at
07-13-2005, 08:34 PM
Short answer: No.

nathan99
07-14-2005, 07:45 AM
Yes, there is, though as said before not secure...

JavaScript Code in the HEAD

<script language="Javascript">
function click() {
if (event.button==2) {
alert('You have performed an illegal operation. \n\Err. #37048932');

//Message shows when right-clicked(Block source)
//Delete When Using code

}
}
document.onmousedown=click

function login() {
var sidewayz='memberhome.html'
var nathan='memberhome.html'

//set the hompages for the members
//Delete When Using code

var nouser='right.html'
var nopwd='right.html'

//set the hompages for when no pass or no username
//Delete this code when Using code

var neither='neither.htm'
var user = document.log.user.value;
var pass = document.log.pass.value;

if (user=="sidewayz" && pass=="drift") {
alert('Acess Granted!\n\nWelcome Message For Alert!');window.location=sidewayz

//verify User name and passwords
//Delete When Using code

} else if (user=="nathan" && pass=="permit") {
alert('Acess Granted!\n\'nAcess Granted!\n\nWelcome Message For Alert!'); window.location=nathan
} else {
alert('Sorry,\n\nyou are not a member!');

//if no password or incorrect
//Delete When Using code

}
}
</script>

and the form

HTML Code in the BODY

<FORM name="log">
<font size="2" face=times>
Username:
<input type="text" name="user" size="10" onBlur = "set_name(this.form)">
<font size="2" face=times>
Password:
<input type="password" name="pass" size="10">
<center>
<input name="Submit" type=button value="Log In" onClick="login()" size="10" onmouseover="window.status='Click To Log In'; return true" onmouseout="window.status='Thankyou for visiting';return true;">
</font>
</center>
</FORM>


I took this straight from my site and cut out most of my codes, although i may have missed a bit

mrruben5
07-14-2005, 08:16 AM
As you see the security is crap! There's no other safe way then protecting pages with .htaccess.

nathan99
07-14-2005, 12:35 PM
Yes they are right, with my code, and the right click blocker is the safest way. And to stop the view source thing through the top option you would put the whole page in a frame, so it shows the frame setters code and not the actual page... get me?

JamieR
07-14-2005, 12:53 PM
Why don't you want to go down the PHP road?

nathan99
07-14-2005, 12:56 PM
Yeah, i thought that, and then i remembered maybe he has a free server, and the good ones with text ads(small) dont allow php. Which is the reaSOn i did that for my site,but now im trying to get cgi and have a seperate account with tripod which allow it and ill parse stuff through that directory



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum