April 16, 200718 yr I need to be able to find based on multiple criteria in a form and I'm running into a problem. The user should not be able to proceed if they don't fill in both fields, but the form is going to the action page instead of the error page if they leave either or both fields blank. I've tried adding the -lop "and" and also the fieldname.op "eq" to no avail. I don't have this problem in my inline statements, just the form. Any ideas what's wrong? hitlist.xsl Please enter your Make and Model. Make Model Search for Parts Thanks in advance for your help.
April 23, 200718 yr In your database, add a calculation field, which is called make_model and concatenates the values in fields make and model. Add this field in your form, with Add also Add a onsubmit="javascript:submitvalues()" call to your form tag The JavaScript function looks like this: function submitvalues() { var vkey1=document.searchform.make.value; var vkey2=document.searchform.model.value; if (vkey1 == "") vkey1="dummy"; if (vkey2 == "") vkey2="dummy"; if (vkey1.indexOf("*") > -1) vkey1="dummy"; if (vkey2.indexOf("*") > -1) vkey2="dummy"; document.searchform.make_model.value=vkey1+vkey2; return true; } This should work and also check for entered * .
Create an account or sign in to comment