Newbies Ferry Posted October 2, 2002 Newbies Posted October 2, 2002 How can I use the find statement to search both (Userid and password) fiels at the sametime.! -op= or -lop=??
Anatoli Posted October 2, 2002 Posted October 2, 2002 Just include both, the default is AND. Just make sure the result is valid, and none of the submitted values is empty.
Jeff Spall Posted October 3, 2002 Posted October 3, 2002 Hi, the trouble with Filemaker is that it will return a result if you only fill in one of the fields. Use this little gizmo to force the user to fill in both name and password. NOTE: it only checks fields called required_*something*, so that is how to name your FileMaker fields. <HTML> <HEAD> <TITLE>enter the database</TITLE> <SCRIPT LANGUAGE="JavaScript"><!-- Original: wsabstract.com --> <!-- Begin function checkrequired(which) { var pass=true; if (document.images) { for (i=0;i<which.length;i++) { var tempobj=which.elements; if (tempobj.name.substring(0,8)=="required") { if (((tempobj.type=="text"||tempobj.type=="password")&& tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&& tempobj.selectedIndex==0)) { pass=false; break; } } } } if (!pass) { shortFieldName=tempobj.name.substring(8,30).toUpperCase(); alert("You must fill in both username and password"); return false; } else return true; } // End --></script> </HEAD> <P><FORM ACTION="FMPro" METHOD="post" name=enterform onsubmit="return checkrequired(this)"> <INPUT TYPE="hidden" NAME="-DB" VALUE="namesandpasswords"> <INPUT TYPE="hidden" NAME="-Lay" VALUE="Layout1"> <INPUT TYPE="hidden" NAME="-format" VALUE="new.htm"> <INPUT TYPE="hidden" NAME="-error" VALUE="enter2.htm"> <INPUT TYPE="hidden" NAME="-max" VALUE="1"><INPUT TYPE="hidden" NAME="-lop" VALUE=AND> <P><INPUT TYPE="hidden" NAME="-op" VALUE=eq> name<BR> <INPUT TYPE=text NAME="required_username" VALUE="" SIZE=26><BR> <INPUT TYPE="hidden" NAME="-op" VALUE=eq>password<BR> <INPUT TYPE=password NAME="required_password" VALUE="" SIZE=26><BR> <INPUT TYPE="submit" NAME="-Find" VALUE="submit"> </FORM></P> </BODY> </HTML> regards, jeff
Anatoli Posted October 4, 2002 Posted October 4, 2002 You can do it in CDML and FM also, e.g. to use calc field with Name & Password and compare that...
Newbies Ferry Posted October 4, 2002 Author Newbies Posted October 4, 2002 I tryd using your javascript and FM strings without succes. I copied it exactly.. I only changed the input values. I do not know anything about javascript. I am using Adobe Golive 6. Maybe you know what I am doing wrong???
Newbies JesseB Posted October 8, 2002 Newbies Posted October 8, 2002 If you use the web security database, you can specify to find the user name and password through text input: <input type="hidden" name="-op" value="eq">Last Name:(text box) <input type="text" name="LastName" value=""> Then have it submit <input type="hidden" name="-find"> <input type="submit" value="Submit">
Anatoli Posted October 8, 2002 Posted October 8, 2002 You can do it in CDML and FM also, e.g. to use calc field with Name & Password and compare that... as mentioned above
sricant Posted October 24, 2002 Posted October 24, 2002 Hi, this FM code is not checking anything.When we press the submit button without entering login name and password it directly going to the format file. Can any one give me code for login and password checking
Jeff Spall Posted October 25, 2002 Posted October 25, 2002 Hi, sorry you couldn't get the java checker to work. In the sample files section of the forum, I posted some stuff about calendars and the logon pages to holiday booking in that use the password script. if you download those files, you can see it working and get the code. regerds, jeff
sricant Posted October 29, 2002 Posted October 29, 2002 Hi jeff, Can u please tell me in which file of that holiday booking sample the password script presents. regards,sri
Jeff Spall Posted October 29, 2002 Posted October 29, 2002 Hi, look in the directory 'holidays' at the format file 'holidayenter.htm' If the search is sucessful, it passes you through to the 'new.htm' page and the holiday database, if a match isn't found, you get another try at 'enter2.htm' I'ts accessing the 'master contact list' database to check username and password. If you just load the whole lot into the filemaker web folder, you should be able to get it working from a browser on the same machine - see the 'links.htm' page for details. regards, jeff
Recommended Posts
This topic is 8130 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now