Addam Posted November 13, 2002 Posted November 13, 2002 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!
Anatoli Posted November 14, 2002 Posted November 14, 2002 It is easier than JS. You need to get CDML Reference database.
Addam Posted November 14, 2002 Author Posted November 14, 2002 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~
Garry Claridge Posted November 15, 2002 Posted November 15, 2002 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
Garry Claridge Posted November 15, 2002 Posted November 15, 2002 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
Addam Posted November 15, 2002 Author Posted November 15, 2002 Thank you SOOO MUCH! That did the trick. I get it now! lol Cheers! ~Addam~
Recommended Posts
This topic is 8036 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