On Wed, Nov 23, 2005 at 11:21:48AM -0500, Patrick LeBoutillier wrote: > Inline::Java is for the Java programming language, not Javascript > (unfortunately they have nothing to so with each other). It might help to amplify that...
There are two languages, Java and Javascript. They look a bit like each other at first glance, but don't really have much in common. Java is used for many things, and javascript is used for client-side cleverness in web-pages. I suspect the confusion may have arisen because the page in question is JSP, which stands for Java Server Pages. This means that before sending the page to you, the web server runs some Java (not javascript) code to generate the text of the page - a bit like mod_perl, but for Java. The (generated) text of the page contains some client-side code written in Javascript, which your browser interprets to do [glances at code] verification of form input before it's sent to the server. So, all Java code is run on the server, to generate the web page that you see. Your browser never sees the Java code. All Javascript code is ignored by the server, and only run by your browser. Inline::Java allows you to use Java code in your Perl. It's no good to you in this situation, because the computer running the Java is not the computer running the Perl. Sadly, WWW::Mechanize doesn't look like it will help, either, as it doesn't speak Javascript: see http://search.cpan.org/~petdance/WWW-Mechanize-1.12/lib/WWW/Mechanize/FAQ.pod You might have to do something like work out the HTTP request that the Javascript would send off in the event of a correct submission, then send that using WWW::Mechanize or LWP::UserAgent or something. Hope that helps, Miles -- Philosophers, for instance, are very concerned with the problems posed by real life, such as "What do we mean by 'real'?" and "How can we arrive at an empirical definition of 'life'?". -- Douglas Adams, The Hitch-Hiker's Guide to the Galaxy