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

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

Comment on java wanna be
(jeffa) Re: java wanna be
by jeffa (Chancellor) 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. :(

    Jeff

    R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
    L-L--L-L--L-L--L-L--L-L--L-L--L-L--
    
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 :)

    Greetz
    Beatnik
    ... 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.

Re: java wanna be
by cLive ;-) (Parson) 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

    .02

    cLive ;-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2014-12-27 22:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls