February 3, 200323 yr Is there anyway to have an exact search when using the input type password? <INPUT TYPE="password" NAME="fieldname" VALUE="" SIZE=10> When a user puts in a correct password there is no problem returning the list page. When a user puts in the wrong password they get an error page. The problem is when a user accidentally types an * (asterisks). This is a FM database find for zero or more characters.....the user retrieves the entire list and not just their own record. Is there an easy way to prevent this from happening -- using this particular command? Thanks in advance! Donna
February 4, 200323 yr Try this: <INPUT TYPE="hidden" NAME="-op" VALUE="==" > <INPUT TYPE="password" NAME="fieldname" VALUE="" SIZE=10> All the best. Garry
February 4, 200323 yr Author I tried your suggestion, but it didn't work. It still retrieve the entire list. This is what I have: <INPUT TYPE="hidden" NAME="-Find" VALUE="=="> <INPUT TYPE="hidden" NAME="FY" VALUE="FY2003"> <INPUT TYPE="hidden" NAME="-op" VALUE="=="> <INPUT TYPE="password" NAME="fieldname" VALUE="" SIZE=10> Would the order make any difference? Any other suggestions?? Thanks!
February 4, 200323 yr <INPUT TYPE="hidden" NAME="-Find" VALUE="=="> <INPUT TYPE="hidden" NAME="FY" VALUE="FY2003"> <INPUT TYPE="hidden" NAME="-op" VALUE="=="> <INPUT TYPE="password" NAME="fieldname" VALUE="" SIZE=10> It appears that you are trying to enter the value "==" into a field named "Find". Change the name of your field if that is the case. From the above it appears that you are trying to search three fields, "Find" and "FY" and a password field which is unnamed and referred to as "fieldname". If you are just trying to make and Exact Field Match of the password, and that password were in a field named "pword", that part of your code could look something like: <INPUT TYPE="hidden" NAME="-op" VALUE="=="> <INPUT TYPE="password" NAME="pword" VALUE="" SIZE=10> OR: <INPUT TYPE="hidden" NAME="pword" VALUE="=="> <INPUT TYPE="password" NAME="pword" VALUE="" SIZE=10>
February 4, 200323 yr Author The part of my code that states: <INPUT TYPE="hidden" NAME="-Find" VALUE="=="> is a trick I found in the FM knowledge database that makes a Find button accessible either through clicking on the button or pressing the "Enter" key. It works really well. The rest of the code......searches the database and limit the records to FY2003 plus matching the password field. My problem happens only when a user enters an * (astericks) into the password field by mistake. They then retrieve all the records and not just their record. FM sees this as a search request for zero to any characters. So, it retrieves everything. I didn't want to have to put full blown security on it because only a select few even know of its existence. Even if it were hacked into 99.9% of the information is available for public use anyway. No big secrets here. Thanks for trying! Any other suggestions? Donna
February 7, 200323 yr Here is a solution which uses some Javascript (no Java): <head> <title>Password</title> <script> function subForm () { if ((document.myform.fieldname.value).indexOf("*") != -1 ) { alert ("Asterisks * are not allowed in the Password!!!"); } else { document.myform.submit(); }; } </script> </head> <body>Enter your Password: <form name="myform" action="FMPro" method="post" onsubmit="subForm(); return false;"> <INPUT TYPE="hidden" NAME="-op" VALUE="=="> <INPUT TYPE="hidden" NAME="FY" VALUE="FY2003"> <INPUT TYPE="hidden" NAME="-op" VALUE="=="> <INPUT TYPE="password" NAME="fieldname" VALUE="" SIZE=10> <INPUT TYPE="hidden" NAME="-Find" VALUE=""> <INPUT TYPE="submit" NAME="-Find" VALUE="Find Records"> </form> </body></html> All the best. Garry
February 10, 200323 yr Author Thank you! Thank you! Thank you! You rock! Worked like a charm the first time around..... Donna
February 28, 200322 yr Hi, I have tried this and the * part works great but I still have the problem with the -op and "==". For the examples, the password field is last name and last 4 digits of the id number. So smith1234. If I use <INPUT TYPE="hidden" NAME="-op" VALUE="=="> <INPUT TYPE="text" NAME="Password" VALUE="" SIZE="20"> <INPUT TYPE="hidden" NAME="-FIND" Value=""> <INPUT TYPE="submit" NAME="-FIND" Value="Search"> then entering smith shows all smith and entering smith* shows "no asterisks allowed". If I use <INPUT TYPE="hidden" NAME="Password" VALUE="=="> (Password instead of -op) <INPUT TYPE="text" NAME="Password" VALUE="" SIZE="20"> <INPUT TYPE="hidden" NAME="-FIND" Value=""> <INPUT TYPE="submit" NAME="-FIND" Value="Search"> then entering smith takes me to -err page but entering smith* doesn't no longer work. Entering smith1234 works in both. Thanks you for help, nati
February 28, 200322 yr Because you now have two <input> tags named "password" you will have to use a different Javascript method to distinguish them. If the "-op" is not producing an Exact Match you can go to FM, after you attempt a login, and do a "Modify Last Find". This will show what FM was trying to look for. Good Luck. Garry
Create an account or sign in to comment