How to pass the values of javascript in perl

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Mar 2006
Posts: 8
Reputation: manish Kishore is an unknown quantity at this point 
Solved Threads: 0
manish Kishore manish Kishore is offline Offline
Newbie Poster

How to pass the values of javascript in perl

 
0
  #1
Apr 13th, 2006
Hi All,
I want to pass the value of java script variable in perl?
how can I do that.

Please help me.

Thanks
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: How to pass the values of javascript in perl

 
0
  #2
Apr 13th, 2006
You cannot. JavaScript is client-side, Perl is server-side. The only thing a web page can do is request a Perl-driven page, and the Request is either GET (pass the values on the querystring) or Post (pass the values in a Form).

So a typical technique is to have a hidden element on the form, set its value via Javascript, and then submit the form.
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 8
Reputation: vonfeldt is an unknown quantity at this point 
Solved Threads: 0
vonfeldt vonfeldt is offline Offline
Newbie Poster

Re: How to pass the values of javascript in perl

 
0
  #3
Sep 27th, 2006
if you could post a snippet, i'll reply an example of what tgreer is getting at.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 3
Reputation: cycleops is an unknown quantity at this point 
Solved Threads: 0
cycleops cycleops is offline Offline
Newbie Poster

Re: How to pass the values of javascript in perl

 
0
  #4
Sep 29th, 2006
Not sure which direction you want to pass, but if u want to pass from perl to javascript -- you write out javascript like this snippet:
printf ("var myVariable = %d;", 1);
If that prints inside a javascript section it would assign the value "1" to the variable.
If u want to pass from javascript to perl, try AJAX.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC