Click to See Complete Forum and Search --> : JavaScript Simple Login? HELP!
thenetman
11-13-2003, 11:10 AM
Hi,
Quite new to Javascript need a little help from some pro Javascript user ;-)
I downloaded a simple member login script and its basically not working!!
Can someone take a look and tell me what I'm doing wrong
This would be much appreciated
Thanks
heres the link to the login page http://www.mymemorydistribution.com
here is the script aswell http://www.mymemorydistribution.com/login.js
seems to be errors on the page but all else seems fine
krautinator
11-13-2003, 11:42 AM
I don't know everything about external .js files
but I would think that if you've put it on your web space with the rest of your files then you can change this:
<script src="http://mymemorydistribution.com/login.js">
to this:
<script src="/login.js">
again I'm not incredibly sure that would work or not
thenetman
11-13-2003, 12:12 PM
Thanks for the help trying it now
;-)
might need more help though ;-)
hi,
there is a lot wrong with the script, for a start the information before the script telling you how to use it basically craps up the rest because it includes '</script>' tags. so to start with delete that and there are other errors so bear with me while i debug it
demo
thenetman
11-13-2003, 12:20 PM
Thank you very much for your help
Its much appreciated!
;-)
okay so the other problems are as follows. you have the username/password arrays:
users[0] = new Array("test" "mymemory","http://mymemorydistribution.com/wholesaleelectrics.htm");
users[1] = new Array("username2","password2","");
you forgot a commar on the first line which creates an error, so it should be:
users[0] = new Array("test","mymemory","http://mymemorydistribution.com/wholesaleelectrics.htm");
users[1] = new Array("username2","password2","");
after this is sorted out a variable called 'imgSubmit' is undefined so basiclly a line like this will have to be included:
var imgSubmit="" //if you dont want an img submit button
var imgSubmit="my_submit_images.jpg" //if you do
and now it should work,
cheers
demo
thenetman
11-13-2003, 04:49 PM
Hi
Thanks for the help - still wont show the imagesubmit imgand imagereset img? after what you said?
Could you help again?
;-)
hi again.
basically what you hav done is specified a variable called:
var imgLogin = "pics/login.gif";
but then in the code below written:
if(imgSubmit == "pics/login.gif"){
so one needs to be changes to the other for it to work!
demo