Can I embed javascript as an xhtml attribute?
<p>I want to update this code to call javascript in order to validate the url of my image.  This is PHP echoing xhtml with embedded javascript.</p>

<pre><code>  echo "&lt;img class = \"c\" src=\"$fav\" alt=\"\"\/&gt;&lt;a name = \"a1\" class = \"b\" href = \"$ass_array[url]\"&gt;$ass_array[name]&lt;/a&gt;";
</code></pre>

<p>This is what I have.  Will it work?</p>

<pre><code>  echo "&lt;img class = \"c\" src=\"&lt;script type=\"text/javascript\"&gt;validate_fav($fav)&lt;/script&gt;\" alt=\"\"\/&gt;&lt;a name = \"a1\" class = \"b\" href = \"$ass_array[url]\"&gt;$ass_array[name]&lt;/a&gt;";
</code></pre>

<p>Thanks.</p>
