Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

js variables to perl?

by dave_pl (Sexton)
on May 19, 2005 at 17:28 UTC ( [id://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!!

Thanks.

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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://458698]
Approved by calin
Front-paged by Thilosophy
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2025-06-13 18:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.