Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

java wanna be

by jsl (Initiate)
on Jun 05, 2001 at 02:27 UTC ( #85639=perlquestion: print w/replies, xml ) Need Help??

jsl has asked for the wisdom of the Perl Monks concerning the following question:

Hi, this is jsl, long time joiner first time caller. In java you are capable of "sensing" the mouse movements, i.e. if you place your mouse on an icon, it lights up. Can it be done with Perl and CGI scripts? Thanks a trillion

Replies are listed 'Best First'.
(jeffa) Re: java wanna be
by jeffa (Bishop) on Jun 05, 2001 at 02:30 UTC
    Short answer: no

    I think you mean JavaScript by the way - but Java does have events in Applet and Application programming. Take a look at Tk or Win32::GUI if you want to use Perl to create window-style applications.

    But as for Web applications, the only way to access events such as a mouseOver is through JavaScript. :(


Re: java wanna be
by cLive ;-) (Prior) on Jun 05, 2001 at 12:43 UTC
    Sorry, OT, but I do like this quote...

    "If Java had true garbage collection, most programs would delete themselves upon execution"

    - Robert Sewell


    cLive ;-)

Re: java wanna be
by sierrathedog04 (Hermit) on Jun 05, 2001 at 06:09 UTC
    No, because Perl CGI, unlike Java, does not have applets that run client side. In order for a CGI script (which by definition runs server-side) to sense the mouse's movements the mouse would have to continually submit its coordinates by posting them in a form, and that is not practical.
Re: java wanna be
by Beatnik (Parson) on Jun 05, 2001 at 09:51 UTC
    You can always bring Java into Perl :)

    ... Quidquid perl dictum sit, altum viditur.
      Perl is not in itself a windowing client but it can drive libraries which display windows, as with Tk.

      In the web context, if you use Javascript to create images in Netscape which automatically highlight on mouseover, Perl can modify that file on the fly to specify which images should be drawn. You would modify a template containing the Javascript on the fly.

      If a gorgeous interface is the most important thing to you, Java or a DHTML interface with Javascript is the answer to the front end. Java or Perl can be used on the back end. Personally I find Swing too heavy and you can probably get everything you need for a web app through DHTML.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://85639]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2021-06-13 03:15 GMT
Find Nodes?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)

    Results (54 votes). Check out past polls.