Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

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)


In reply to Re: How to make a friendly UI by tinman
in thread How to make a friendly UI by daveh71

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2023-09-30 23:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?