Embedding php in javascripts
<p>I was trying to embed some PHP into a javscript function that gets called from an onChange in a drop down list. the javascript function is in a .js file, I can get the DDL to call the function, however i cannot get the function to work with the php... eventually i am going to use the value selected in the DDL to access a DB and populate other fields from there, right now i am trying to get it to work with the php: </p>

<pre><code>    function controllerType(){

       alert('outside php');
       &lt;?php
       $message = "inside php";
       echo "alert('$message');";
       ?&gt;

     }
</code></pre>

<p>The function prints the first alert but not the alert called in the php.</p>
