Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: How to make a friendly UI

by tinman (Curate)
on May 03, 2001 at 05:24 UTC ( #77542=note: print w/ replies, xml ) Need Help??


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)


Comment on Re: How to make a friendly UI

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://77542]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (15)
As of 2014-09-16 13:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (22 votes), past polls