November 13, 200223 yr Not quite sure how to tackle this... Like the FMP App... wich allows you to do a find, then a new request, and another if needed, and so on. Then you hit FIND and you get your results. How is that pulled off using webcompanion? I'm using some custom pages and I would like to be able to do that as well. I'm new at this portion of filemaker so please bare with me! Thank you! I wish it was as easy as Javascript!
November 14, 200223 yr Author Ok... I've got the CDML Reference Database... I was FIRST trying to just use some of the operators to see how they work... but I don't think I'm getting what I'm asking for. Example: I have 6 records... field: "First Name" had 4 people who's names begin with the letter "J". When I use the "neq" value in the "-Op", I was expecting to see eveything that DIDN'T contain the letter "J", but I get the opposite... Here is the syntax I'm using w/ explinations: <script language="JavaScript"> function adval(){ var f=document.forms[0]; f.elements[4].value = f.setPar[f.setPar.selectedIndex].value; alert("The Value of the '-Op' is: "+f.elements[4].value); } </script> ... <-- The javascript set's the "-Op" value based upon the selection. The Alert is just to make sure the value is being set.--> ...<form action="FMPro" method="post" name="find"> <input type="hidden" name="-DB" value="bammo.fp5"> <input type="hidden" name="-format" value="thepage.html"> <input type="hidden" name="-lay" value="testing"> <input type="text" name="-Op" value=""> <select name="setPar"> <option value="neq">not equals</option> <option value="eq">equals</option> <option value="ew">ends with</option> <option value="cn">contains</option> </select> <input type="text" name="First Name" value=""> <input type="text" name="Last Name" value=""> <input type="submit" name="-find" value="done" onClick="adval();"> </form> This looks right to me. Does anyone know what I'm doing wrong, or am I expecting something that's not supposed to happen. Thanks! ~Addam~
November 15, 200223 yr Addam, Remove the name parameter from the <select.. tags. This is because FM will look for a field by that name. Try this Javascript: <script language="JavaScript"> function adval(){ var f=document.find; f.elements["-Op"].value = f.elements[4][f.elements[4].selectedIndex].value; alert("The Value of the '-Op' is: "+f.elements["-Op"].value); } </script> Good Luck. Garry
November 15, 200223 yr Addam, I have just had a rethink on this. Try this (no Javascript needed) <form action="FMPro" method="post" name="find"> <input type="hidden" name="-DB" value="bammo.fp5"> <input type="hidden" name="-format" value="thepage.html"> <input type="hidden" name="-lay" value="testing"> <select name="-Op"> <option value="neq">not equals</option> <option value="eq">equals</option> <option value="ew">ends with</option> <option value="cn">contains</option> </select> <input type="text" name="First Name" value=""> <select name="-Op"> <option value="neq">not equals</option> <option value="eq">equals</option> <option value="ew">ends with</option> <option value="cn">contains</option> </select> <input type="text" name="Last Name" value=""> <input type="submit" name="-find" value="done"> </form> All the best. Garry
November 15, 200223 yr Author Thank you SOOO MUCH! That did the trick. I get it now! lol Cheers! ~Addam~
Create an account or sign in to comment