Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

js variables to perl?

by dave_pl (Sexton)
on May 19, 2005 at 17:28 UTC ( #458698=perlquestion: print w/replies, xml ) Need Help??
dave_pl has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks

I am in need of some WISDOM...

I am working on a perl cgi script that has a js function
inside when a user uses the onBlur(such as tab..)key to
jump to the next field i get the value into the js function
now what i would like to do is get the value in js variable
into my own perl scalar so i can do a quick search without
parsing to a nother form etc.. i know that CGI happens
on the server side but this is within my script so i should
be able to parse it o_O? PLEASE HELP!!


Replies are listed 'Best First'.
Re: js variables to perl?
by mpeters (Chaplain) on May 19, 2005 at 17:57 UTC
    You can also look at Javascript::RPC. Seems like an easy way for JS to give info to perl or vice versa.

    More people are killed every year by pigs than by sharks, which shows you how good we are at evaluating risk. -- Bruce Schneier
      Thanks for the reply and help i will have a look!!!
Re: js variables to perl?
by the_0ne (Pilgrim) on May 19, 2005 at 17:53 UTC
    Not sure if you want to get this advanced, but have you ever heard of Sajax? It's a way to define perl subroutines on the server that you can then interact within javascript (on the client). I've used it for my company's intranet in 2 pages the last 2 weeks. Saves all the code to submit the page and then fill hidden variables and then process with javascript code on the submitted page.

    Also works with python and php. Examples provided in link above.
Re: js variables to perl?
by astroboy (Chaplain) on May 20, 2005 at 02:48 UTC
Re: js variables to perl?
by gloryhack (Deacon) on May 20, 2005 at 10:15 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://458698]
Approved by calin
Front-paged by Thilosophy
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2018-01-24 07:27 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (256 votes). Check out past polls.