Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7414 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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!

Posted

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

  • 4 weeks later...
Posted

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).

This topic is 7414 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.