in reply to calling perl function from HTML

This question comes up often, so search for it: perl from html

Replies are listed 'Best First'.
Re^2: calling perl function from HTML
by jhourcle (Prior) on Jul 18, 2005 at 22:58 UTC

    Actually, what that search finds isn't useful.

    Most of the questions on this topic are how to embed perl in HTML, or other sorts of things that are done on the server side.

    Rainmaker's question is about telling the user agent to call a perl function when someone changes the value of an HTML form element.

    This can't be done reliably. onchange is typically used to call JavaScript (or JScript, LiveScript, ECMAScript, or whatever implementation it is that your browser uses)

    Yes, you can try specifying that the script's language is 'text/perl', or 'text/tcl' or 'text/vbscript', but you can't be sure that the browser will know what to do with it.

    If you want to try for yourself, save this code to file, and test it for yourself.