October 2, 200223 yr Newbies How can I use the find statement to search both (Userid and password) fiels at the sametime.! -op= or -lop=??
October 2, 200223 yr Just include both, the default is AND. Just make sure the result is valid, and none of the submitted values is empty.
October 3, 200223 yr 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
October 4, 200223 yr You can do it in CDML and FM also, e.g. to use calc field with Name & Password and compare that...
October 4, 200223 yr Author Newbies 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???
October 8, 200223 yr Newbies 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">
October 8, 200223 yr You can do it in CDML and FM also, e.g. to use calc field with Name & Password and compare that... as mentioned above
October 24, 200223 yr 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
October 25, 200223 yr 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
October 29, 200223 yr Hi jeff, Can u please tell me in which file of that holiday booking sample the password script presents. regards,sri
October 29, 200223 yr 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
Create an account or sign in to comment