Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have the following setup to secure a website and require a login name and password before being directed to another webpage within the site. The problem is, you must actually click on the "Login" button. If you hit the "enter" key, you just hear an audible "ding" even if you entering the correct information, and you do not get directed to the new page. I am pretty sure there is just a simple piece of code I am missing, but I don't know what. Please help. Here is what I have so far:
<script language="javascript">
</script>
<script type="text/javascript">
function disable()
{
if (event.button == 2)
{
alert("Sorry no rightclick on this page!")
}
}</script>
<body onmousedown="disable()">
<center>
<table bgcolor="white" cellpadding="12" border="1">
<tr><td colspan="2"><center><h1>Login
Area</h1></center></td></tr>
<tr><td><h1>UserID:</h1></td><td><form name="login"><input
name="id" type="text"></td></tr>
<tr><td><h1>Password:</h1></td><td><input name="pass"
type="password"></td></tr>
<tr><td><center><input type="button" value="Login"
onClick="pasuser(this.form)"></center></td><td><center>
<input
type="Reset"></form></td></tr></table></center>
Thanks much,
Sunny

<html>
<body>
<script type="text/javascript">
function disable()
{
if (event.button == 2)
{
alert("Sorry no rightclick on this page!")
}
}</script>
<body onmousedown="disable()">
<center>
<table bgcolor="white" cellpadding="12" border="1">
<tr>
<td colspan="2">
<center><h1>Login Area</h1>
</center>
</td>
</tr>
<tr>
<td>
<h1>UserID:</h1>
</td>
<td><form name="login"><input name="id" type="text">
</td>
</tr>
<tr>
<td>
<h1>Password:</h1>
</td>
<td>
<input name="pass" type="password">
</td>
</tr>
<tr>
<td>
<center><input type="submit" value="Login" onClick="pasuser(this.form)"></center>
</td>
<td>
<center><input type="Reset"></form>
</td>
</tr>
</table>
</center></body>
</html>
lol, thats how you're supposed to write it, you make it like a weirdo. anyway, i just substituted:
<input type="button" value="Login"
for
<input type="submit" value="Login"it should work now, have fun.
dang, they dont let you use TABS in these forums. what a bummer. anyway, have fun.
also... give me the site to your little authentification form when you're finished, i wanna see how long it'll take me to crack it assuming you're using javascript for that
FBI Agent
AIM: EliteAssassin187

FBIAgent why do you have to be so rude? Sunny was just trying to get some help with a script not insulted. You aparently spend more time on this foum than Sunny, who was not aware of how the code would look on here. I think if you can't help someone without insulting them then keep you help to yourself.

ummm... insulting? i wasnt insulting, i was just giving a way to make it easier to edit the html when you need to. if i came off as offensive im sorry because it wasnt supposed to be like that. but there's no tabs in it anyway (like this forum doesnt support tabs) so maybe he did use those to post, i dont know. i just made all of that cluttereed html non-cluttered so that you could actually edit it with ease.
anyway, i guess it worked since you havent replyed. your welcome
FBI Agent
AIM: EliteAssassin187

I have since learned that this is not a secure way of creating a webpage. I will be researching other ways to do this. I found that even though you could not right click on the page to view the code, you can still go to "View" from the browser menu and select "source" and view the information. This is all a part of the learning process in my opinion. I do appreciate the input on this forum, but not the sarcasim.
Sunny

![]() |
How do you find out someo...
|
getting a site online
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |