I wish I was better at Java, but I¹m stumped with a simple java script. I am using the script below to password protect a page. When the user inputs the proper username and password, they are taken to a particular page. Works fine. BUT I need to have more than one username and password with a different destination.
For example, if they enter username= one and password = one they are taken to page one If they enter username= two and password= two they are taken to page two.
I can¹t figure out how to change the script to include the second set of instructions... Can anyone help me on this one? Here¹s the script in it¹s working form. I thought it would be a simple cut and paste, but it¹s not working for me.
/*This Script allows people to enter by using a form that asks for a UserID and Password*/ function pasuser(form) { if (form.id.value=="one") { if (form.pass.value=="one") { location="one.html"
} else { alert("Invalid Password") } } else { alert("Invalid UserID") } } //--> </script> -- Matlin Recording, Inc. Audio & Video Post Production 23 East 31st Street  Penthouse New York, NY 10016 Allan Gus
-- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/GoLive/Browse/ Manage your subscription: http://www.ListSearch.com/GoLive/
Dec 16
rgb Re: Help with java script
Dec 16, 2008; 08:35
rgb
Re: Help with java script
Dec 16
Allan Gus Re: Help with java script
Dec 16, 2008; 08:58
Allan Gus
Re: Help with java script
Dec 16
Rob Keniger Re: Help with java script
Dec 16, 2008; 13:26
Rob Keniger
Re: Help with java script
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!