javascript and php variables exchange <p>would be possible to pass javascript variable to php and execute function on it and convert it back to javascript</p> <p>what I want is to get the value on click of an input field and deocode and pass it back</p> <pre><code>&lt;script type="text/javascript"&gt; $('.my_id').click(function(){ var lv = $('div.special_box form input').val(); var lv = &lt;?php base64_decode( 'here should come my javascript variable' )?&gt; }); &lt;/script&gt; </code></pre>