Javascript variables within attributes
<p>With php it's easy to do something like this</p>

<pre><code>&lt;?
$x = "Joe";
echo "My name is $x";

?&gt;
</code></pre>

<p>But I'm having trouble doing something similar with javascript</p>

<pre><code>var div = document.createElement("DIV");
    x="SomeValue";
    div.setAttribute("id", (x));
    div.setAttribute("onMouseDown", "SomeFunction((x))");
</code></pre>

<p>where obviously I want x to be "SomeValue", but every time I look at the output, it just says x instead of the value.</p>
