July 8, 200421 yr Newbies I have successfully set up FMPro Unlimited v5.5 to serve up web sites using templates created by using v3 of Claris Home Page with its assistant. These web sites contain a home page, a search (criteria) page, search results (list format), and a detail page. I'd like to create a button on the web page that would find a specific set of records, ie. a value of "category=cars" and have it immediately perform the search and display the results in the searchresults list view on the web. I've performed the search and then looked in the log to see if I could extract the necessary code, but haven't yet succeeded. Does someone know what the code would be that would have to be attached to the button? Thank you!
July 8, 200421 yr Hi, Donn! There's a couple ways to do it. One way would be to have a tiny web form that uses hidden inputs and has the button as the submit. The easier way would be to use a graphic button (.gif) rather than a real web form button and just put a FileMaker Web Companion link on it. link: http: no url //www.donntarris.com/FMPro?-db=dbname&-lay=layoutname& -format=searchresults.html&-error=error.html& category=cars&-sortfield=cars&-sortorder=ascend&-find I broke the line to keep it from getting too long (and added "no url" to try to fool the post software), but you'd keep it in one giant string. You can add other things, too, or remove things like -sortfield if you don't want them. If you do it the form way, you'd do the same thing but use hidden inputs... <FORM ACTION="http://www.donntarris.com/FMPro" METHOD="post"> <INPUT TYPE="hidden" NAME="-db" VALUE="dbname.fp5"> <INPUT TYPE="hidden" NAME="-lay" VALUE="layoutname"> <INPUT TYPE="hidden" NAME="-format" VALUE="searchresults.html"> ... and so on .. <INPUT TYPE="hidden" NAME="category" VALUE="cars"> <INPUT TYPE="submit" NAME="-find" VALUE="CLICK HERE TO FIND CARS"> </FORM> But you get the idea, eh? Good luck! --ST
August 5, 200421 yr If you are wanting an actual "button" as opposed to a graphic, you can use an intrinsic event like this: <input type="button" onclick="parent.location='FMPro?-db=dbname&- lay=layoutname&-format=searchresults.html&-error=error.html&category=cars&- sortfield=cars&-sortorder=ascend&-find '" value="BUTTON LABEL"> Jonathan EDIT: Note that you need both an apostrophe (') and a quote mark(") at the end there. (It's not really very visible when I posted).
Create an account or sign in to comment