| | |
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 |
acid2 ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets automatically beta box browser bug captchaformproblem checkbox close codes createrange() css cursor debugger decimal dependent disablefirebug dom download dropdown editor element engine enter error events explorer ext file firefox form forms frameworks getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 ie8 iframe index internet java javascript javascripthelp2020 jquery jsf jsfile jsp jump listbox maps masterpage math media menu microsoft mp4 object onmouseoutdivproblem onreadystatechange paypal pdf php player position programming progressbar prototype redirect regex runtime safari scale scriptlets search security select size software sql text textarea unicode w3c window windowofwords windowsxp wysiwyg \n






