JavaScript login checker on HTML form won't work?
918918
Try the code below\n\nfor the java script:\n\nfunction checkLogin (form) {\nif (form.username.value == "admin") {\nif (form.password.value == "admin1") {\nlocation = "http://www.yahoo.com";\n} else {alert("Invalid username or password.");}\n}\nelse if (form.username.value == "user") {\nif (form.password.value == "user1") {\nlocation = "http://www.google.com";\n} else {alert("Invalid username or password.");}\n}\nelse {alert("Invalid username or password.");}\n}\n\nand for the form:\n\n<form>\n\nName<input type="text" name="username">\nPass<input type="text" name="password">\n<input type="submit" value="Go!" onClick= "checkLogin(this.form); return false">\n\n</form>\n\nNote: There are some minor (important) modifications.\n\nHope this helps :-)
937005
You don't say if this is during logon to window or on a website.\nIt may be you have autofill enabled in one of your browser settings, IE can be set to remember passwords. Or you have a toolbar such as Google which has remembered it.\n\nNeed more info!
639699
when you login click the checkbox that says "Remember me on this computer". That will only last one day though.\n\nI have a better way. :) I download the login page and hard code my username and password right in the form and put the form on my startup page. all i have to do from then on is to point and click my way into my accounts.\n\nyou have to know html for this to work for you.\nhttp://dwight.clickthesky.com/snippets1/fancygeocitieslogin.shtml\n\nif you don't know html don't ask me to do it for you :(
984687
Try password or Password and see what happens.  Just a guess.
314336
http://www.myspacesupport.com/myspace-codes/hide-login.php\nGo to that website. You are supposed to put the code in the about me place. I don't know if that affects its ability to work. Step by step:\nIn about me:\n<style type="text/css">.lastlogin {visibility:hidden;}</style>\n\nGo into basic info and edit your city and type:<span class=lastlogin>\n\nNope sorry thats my only I suggestion.
83426
This is somewhat of an apple and orange question.\n\nIn the context you are talking about, PHP runs on the server. JavaScript runs on the client. This has advantages and disadvantages in both cases.\n\nSuppose we want to provide a form that only accepts social security numbers. Using JavaScript, we can immediately reject incorrect input, add dashes to the formatting, etc. And the server doesn't have any extra load placed on it. BUT... you assume the browser supports JavaScript and the user didn't turn it off. You also open the door for someone to bypass your scripts maliciously and put in a bad number.\n\nIf you use PHP, you probably won't be able to monitor every keystroke and dynamically insert dashes. Plus each validation is more load on your server. But the client can't force a bad number in and the browser can be anything at all -- no JavaScript required.\n\nSometimes you use both. JavaScript to get the pretty character by character formatting and PHP to do a final simple validation.\n\nAlso, AJAX allows JavaScript to call back to PHP seemlessly (look up AJAX on Google).\n\nFinally, this is a limited example. If you wanted to, say, produce a pong game that runs in the browser -- that's a job for JavaScript (or Java, but that's another question). If you wanted to send an e-mail form to a list of addresses in a predefined database, you probably want PHP. \n\nDoes that help?
746355
If you are using PHP go to this link\nhttp://www.free2code.net/plugins/articles/read.php?id=99\n\nIf you are using ASP go to this link.\nhttp://www.aspin.com/home/tutorial/usermanage/login]\n\nIf you are using Java go to this link.\nhttp://www.javascriptkit.com/script/script2/loginpass2.shtml\n\nIf you are using Perl go to this link.\nhttp://www.osix.net/modules/article/?id=284
251687
You need to uncheck the box that says keep me logged in. If you log out and then try to log back in I think it should show you that. Or else if you just delete the cookie and then try to log in and uncheck that box.\n\nThat never happens to me I have to enter my password each time to sign in.
219203
Suppose we have a JSP value as customerid=2, for which these customerid should be passed to Javascript.\nThis can be done as:\n<input type="hidden" name="custid" value="<%=customerid%>"> this should be after <form tag>\n\nIn Javascript under <head>\n<script language="javascript">\nfunction validate()\n{\nvar strCust= document.formname.custid.value;\nalert(strCust);\n}\n</script>\n\nThis will give the alert as 2.\nThus we passed the JSp value to Javascript..
95745
Check the java script.
241324
The same thing was happening to us yesterday. We were definitely typing in the correct password. Didn't seem to do with cookies or temporary internet files either. I'm thinking was a problem on the Yahoo side of things. Seems to be fixed today, without having to do anything on our end.\nThere were others having this same problem also. See the links below.
436113
Go to IE Explorer > Tools > Internet Options > Content > under Personal Information > click onto AutoComplete button  > when u get there, unchecked the box for "Usernames and passwords on forms".
260578
The code is broken for the page to load correctly. A method which is how the get statement is executed.\n\nTry using anohter browser or call the webmaster for the site
805338
^_^ weeeeell lets see here.\n\nYou have two main options. One\nis to use Javascript (Look below) and\nTwo, to use PHP.\n\n\n This is an example of javascript that will prompt the\nuser for their user name and password before they can\naccess the page. Just put this in the header of your page.\n\n<script language="Javascript" type="text/javascript">\nname = prompt("User name");\npass = prompt("User Password");\n\nif(name == "joe" && pass == "shmoe"){\nwindow.location =   "www.ProtectedpageURL.com";\n}else{\nalert("Incorrect password");\nwindow.location = "www.invalidInfoPage.com"\n}\n</script>\n\nRemember, javascript can be seen in your source so have them\nclick a link to goto the page with this code, and the redirect on\ncorrect or incorrect information will keep them from ever\nbeing able to access the page and see the source where your\naccount information will be held. \n\n\nIf you have PHP enabled on your website then email me\nat void_3e01@yahoo.com and I will be more than happy to\nmake you a complete, fool proof login script.\n\n -Void
199505
The error on your status bar is because the javascript on that  particular has not successfully executed.\n\nPossibly javascript is not enabled. Try changing the browser
1093628
Try to merge them in one. When use hidden input changed by javascript depending on the form user fills. \nI could tell you more if you provided me with more detailed information.
528226
Are you're using the computer at work. The computer adminstrator must have put a block on "Log In"  This has happened to me before.  I had to download another browser either Firefox or Netscape will be fine.