Two suggestions, neither particularly elegant:
1) In one of our cFP application we built a small web server that was just smart enough to
listen for our expected URL requests and reply (plus a default error page). This gives
you complete control over how the application responds to any request so passing out
a boolean value when a certain link (button) is pressed is easy. The disadvantage is
the reduced functionality of the web server and increased complexity of handling pages.
2) A 'wrapper' that just listens for a specific URL but otherwise passes any requests
through to the built in web server. Listen on ip.address:8080 for the URL of your button
(hyperlink). When it sees that specific URL respond to the application, otherwise pass
the request unaltered to the server (ip.address:80 or 127.0.0.1:80 should also work).
You will also have to handle the reply side of the conversation in the wrapper.
Hopefully someone can suggest simpler approaches!
Matt