![]() |
| ||
| How to pass the values of javascript in perl Hi All, I want to pass the value of java script variable in perl? how can I do that. Please help me. Thanks |
| ||
| Re: How to pass the values of javascript in perl 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. |
| ||
| Re: How to pass the values of javascript in perl if you could post a snippet, i'll reply an example of what tgreer is getting at. |
| ||
| Re: How to pass the values of javascript in perl 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. |
| All times are GMT -4. The time now is 4:40 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC