This is a discussion on "Javascript newbie" within the JavaScript Forum section. This forum, and the thread "Javascript newbie are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Javascript newbie
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Help....I am a Javascript newbie! I am trying to create a js file with login IDs and passwords for multiple users. The code I have is for one user.
How do I change this code to accomodate multiple users:
I have tried a whole lot of things but nothing recognizes more than one user. Any help would be greatly appreciated. Last edited by karinne; Aug 3rd, 2007 at 12:02. Reason: Please use [ code ]...[ /code ] tags when displaying code. |
|
|
|
||||
|
Re: Javascript newbie
You can either make an array of usernames and passwords but then that's not dynamic. Your other option is to have some kind of database (mySQL, file).
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
|||
|
Re: Javascript newbie
When i think of JavaScript and passwords I think:
alert("DO NOT USE JAVASCRIPT FOR PASSWORDS!") Not a good idea. I hope this is for learning purposes. If you use JS anyone can see the passwords and all the other personal information. Not to mention that they can just shut it off and access anything they want. Use a server side language such as PHP or ASP to check for passwords and usernames against a database. Although it is ok to use JS to validate the entry before sending off to the server. You cannot access a MySQL database with JS. Good Luck, Scott |
|
|||
|
Re: Javascript newbie
thanks. the idea was simply to validate passwword and re-type password before the form data goes off to the server.
|
|
|||
|
Re: Javascript newbie
of course like ScottR says this is no security at all. On a minor point perhaps I can correct Scott? If you wanted to use javascript to access a mySQL database you could use JScript.net (basically Javascript with bells) or - I think Borland used to make a web server Intraserver that used Javascript. Or JScript in ASP. Unusual but possible Last edited by Kropotkin; Aug 9th, 2007 at 14:46. Reason: Please use [ code ]...[ /code ] tags when displaying code! |
|
|||
|
Re: Javascript newbie
could one not easily hide the data in an external .js file though to keep securaty?
|
|
|||
|
Re: Javascript newbie
I don't think so Joe
The external js file is visible - unless you are talking signing it and encrypting it - but i don't think anyone does that? Netscape had a system but as far as i know it never caught on? Justin |
![]() |
| Tags |
| login and passord, javascipt, multiple users |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Newbie to Javascript | dapirates | JavaScript Forum | 5 | Mar 11th, 2008 21:21 |
| newbie javascript problem | c_martini | JavaScript Forum | 10 | Sep 7th, 2007 08:19 |
| Newbie, Please help with javascript links | lea | JavaScript Forum | 1 | Nov 9th, 2006 14:45 |
| Newbie in Javascript | ktsirig | JavaScript Forum | 1 | Mar 12th, 2006 05:20 |
| JavaScript Newbie Seeks Guidance | jswebdev | JavaScript Forum | 0 | Dec 5th, 2005 20:44 |