How can I execute php from a javascript function?
<p>How would I go about executing a php-script from a javascript-function?</p>

<pre><code>&lt;?php if ( isset( $results['errorMessage'] ) ) { ?&gt;
    &lt;script type="text/javascript&gt;somemethod(&lt;?php echo $results['errorMessage'] ?&gt;)    &lt;/script&gt; 
&lt;?php } ?&gt;
</code></pre>

<p>Sorry for the bad formatting - not sure how to use code in this editor :S</p>
