Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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!!

Thanks.

Comment on js variables to perl?
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 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 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
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? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2014-07-10 06:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (200 votes), past polls