This is really quite easy once you know how to do it. The problem is, there are a lot of moving pieces so it can be very difficult the first time you try. You'll want to read up on HTTP and XMLHttpRequest as lostjimmy recommends and DHTML. Though do not try to do the requests yourself. They are painful, difficult, and verbose to do in a x-platform way. Use a JS lib. I personally recommend jQuery. I've worked with a few of them and it's the most facile and Perl-like to me.

Before you proceed however, make sure that the feature isn't a security risk, which it sounds like to me. If, for example, I could put javahead into a field and automatically see personal information on PM, it would be a problem. :) If this is for an app like an HR frontend or something which only authorized individuals will be using, then it would be a nice feature. Otherwise, it's probably something to avoid.

(update: I wrote a little sample script doing a simplistic version of this stuff. I'll post it later today when I have time to add comments and info.)


In reply to Re: CGI how to lookup a value when a Field is filled in by Your Mother
in thread CGI how to lookup a value when a Field is filled in by javahead

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.