echo javascript funtion with php variables as arguments
<p>In test.php:</p>

<pre><code>&lt;?php
$result = "test";
echo '&lt;script type="text/javascript"&gt;parent.showThanksDiv(\"&lt;?php echo $result;?&gt;\");&lt;/script&gt;';
?&gt;
</code></pre>

<p>and in test.html</p>

<pre><code>  &lt;script type="text/javascript"&gt;
 function showThanksDiv(text){
      document.getElementById("myThanksDivtext").value = text;
    }
&lt;/script&gt;
</code></pre>

<p>That's not working. It seams Im not passing php variables correctly. Any ideas?</p>
