| | |
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
![]() |
•
•
Join Date: Dec 2004
Posts: 1,655
Reputation:
Solved Threads: 35
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.
So a typical technique is to have a hidden element on the form, set its value via Javascript, and then submit the form.
•
•
Join Date: Sep 2006
Posts: 3
Reputation:
Solved Threads: 0
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.
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.
![]() |
Similar Threads
- which process reads the cin (C++)
- who here can do perl? (Perl)
- Javascript generated drop down menu (JavaScript / DHTML / AJAX)
- help with javascript and forms (PHP)
- how to pass a array from asp to javascript (JavaScript / DHTML / AJAX)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Printing in landscape
- Next Thread: Javascript + HTML DOM problem
| Thread Tools | Search this Thread |
ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate array automatically browser bug calendar captchaformproblem cart checkbox child close codes createrange() cursor date debugger dependent disablefirebug dom dropdown editor element embed engine events explorer ext file firefox focus form forms frameworks getselection google gxt hiddenvalue highlightedword hint html htmlform ie7 ie8 iframe images internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jsp jump libcurl maps masterpage math media microsoft object onmouseoutdivproblem onreadystatechange parent paypal pdf php player position post programming progressbar prototype redirect regex runtime safari scale scriptlets scroll search security shopping size software sql text textarea unicode web website windowsxp wysiwyg \n






