RoadrunnerRay Posted August 15, 2005 Posted August 15, 2005 (edited) search field is left blank. I have a form the user enters their "USER ID" into and then clicks Log-In to search for their data. Using CDML, Garry Claridge said to Use "==" for the operator to avoid a problem getting an incorrect record when the user left the field blank. This worked fine. Now under XSLT (and Filemaker 7) this does not work, when the user leaves the field blank the first record of the database is returned. Here is the form I am currently using. ================================================= verify_data.xsl User Name Mac Users please note: you must mouse click the Log-In button or tab into it after entering your User Name. Pressing "Enter/Return" while in the text box will not work! ================================================= Any assistance will be greatly appreciated... Ray Edited August 15, 2005 by Guest
Martin Brändle Posted August 15, 2005 Posted August 15, 2005 Ray, yes, this technique does not seem to work with FM 7. Also there is a problem if one uses a wildcard in one of the form fields. Have a look at this post: http://fmforums.com/forum/showpost.php?post/168610/ for a possible solution.
RoadrunnerRay Posted August 16, 2005 Author Posted August 16, 2005 Hi Martin, welcome back! Thanks for the link, I will look at it today. I am taking today off to have some dental work done so probably will not get back until tomorrow am.........Ray
RoadrunnerRay Posted August 17, 2005 Author Posted August 17, 2005 Ray, yes, this technique does not seem to work with FM 7. Also there is a problem if one uses a wildcard in one of the form fields. Have a look at this post: http://fmforums.com/forum/showpost.php?post/168610/ for a possible solution. Hi Martin, reviewed your source (LogIn) page and javascript and had a question. I see where you are setting the variable vkey1 to "dummy" if the input "Name" field is blank but I do not understand what the rest of the script does. Also, in the table on the left of the page you might want to change "impressum - About CLICAPS" to "Impressions - About CLICAPS". You could also use "Feedback" in place of "Impressions". Thanks for your assistance.....Ray
Martin Brändle Posted August 17, 2005 Posted August 17, 2005 That is the script: function submitkeys() { var vkey1=document.login.Name.value; var vkey2=document.login.PIN.value; if (vkey1 == "") vkey1="dummy"; if (vkey2 == "") vkey2="dummy"; if (vkey1.indexOf("*") > -1) vkey1="dummy"; if (vkey2.indexOf("*") > -1) vkey2="dummy"; document.login.name_pwd.value=vkey1+vkey2; return true; } Explanation: lines 5 and 6: if one of the input fields is empty fill them with the string "dummy". lines 7 and 8: if one of the input fields contains a wildcard character (*) fill them with the string "dummy" line 9: concatenate the two strings and assign them to the field name_pwd name_pwd is submitted as well as a hidden field. In the database it is a calculation field = name & password A record with the value "dummy" or even "dummydummy" in field name_pwd does not exist in the database. Hence, if an empty name or password field or a field with a wildcard is submitted, there will be no match. -- You are right that "impressum" is most probably a wrong translation of the german "Impressum", which stands for a web page stating certain legally required information about their publishers and their responsibles. "Impressions" and "Feedback" do not work here. At http://dict.leo.org/archiv.ende/2004_09/09/20040909205636e_en.html and related pages, there exist longer discussions on which translation might be correct. An appropriate translation might be "Editor information" or "publisher information" or even "imprint".
RoadrunnerRay Posted August 18, 2005 Author Posted August 18, 2005 Hi Martin, thanks for the explanation, I had not thought about checking for a blank field as I do with other forms in the system but this would solve the problem. We will be introducing a password along with the User Name later this year. Thanks again for your help, I have a couple of other minor problems before I cut over the system to FM7 with XSLT but am almost there.........Ray
Recommended Posts
This topic is 7029 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