http://www.perlmonks.org?node_id=77542


in reply to How to make a friendly UI

As far as I know, there isn't a way to call a Perl function (I assume you mean a CGI script) directly from the client in the way that you ask.. You could do some trickery with window.open() etc, etc, but I don't think that's what you mean...

The only solution that I can see is to have the possible combinations of database select boxes highlighted.. ie: build a data structure within your client side javascript code..

I've seen what you ask being done inside applets (but applets are difficult to venture into for other reasons, not least being that its not Javascript, but Java :o)

Umm, as I see it, the problem here is that Javascript is intended to be executed at the client side, and to have it fetch stuff from a remote server is not a really good thing to be doing, even if its possible (which in some cases, it may not be).. A CGI script is a server side deal, so it should and does fetch stuff from a remote database..

So, if you really want this functionality present through Javascript, build an indexed array within your HTML page (a Javascript array) that has the relevant combinations..and write the display logic in Javascript as well... you can generate all of this through a server side CGI script...

But I'd personally recommend that you think of an alternative means of getting the functionality you desire.. HTML isn't a local-machine GUI paradigm, its slightly different, and the interfaces that you build should take that into account..
my <$0.02 ;o)