Creating Javascript function called from PHP
<p>I have a piece of Javascript that invokes a social publishing widget overlay. When you load the page the overlay will popup and this is the script that calls it:</p>

<pre><code>&lt;script type="text/javascript"&gt;
  RPXNOW.loadAndRun(['Social'], function () {
    var activity = new RPXNOW.Social.Activity(
       "Share your comment",
       "commented on 'Like My New Perfume?' on cuteoverload.com",
       "http://cuteoverload.com/2009/10/26/like-my-new-perfume/");
    RPXNOW.Social.publishActivity(activity);
  });
&lt;/script&gt;
</code></pre>

<p>I need put somehow create a javascript or php function that will fire when this PHP function is called:</p>

<pre><code>function response($oAlert) {
    // something to happen here;
}
</code></pre>
