Your reference to javascript leads me to assume that you're talking about interactions between a web browser client and a perl script running on a web server. As I understand it, the only way for this to happen is to have javascript functions running on the browser client that will send http requests back to the server for each relevant event, and then handle whatever the server sends out in return (if anything).

There's no other way for a server to know what a client is doing with a page that was last sent, and the server cannot cause perl code to execute on the client (unless/until someone builds and distributes a browser that runs perl instead of javascript -- if that's ever been done, I suspect it's not something that gets wide usage or support).

If you're talking about a "console GUI" application, using Perl/Tk or Perl/Gtk or Perl/Qt or ..., that's a different matter, and of course actions like leaving a text field can be detected and acted on by binding events to callback functions.


In reply to Re: Text field event handling by graff
in thread Text field event handling by zkr500

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.