Function parameter Undefined
<p>I'm extremely frustrated by a couple of functions in my code. I have a couple of functions that fire when a user clicks on a link.<br>
The parameter is correctly sent to both function but when the user clicks the link for <code>detailplace</code> I get a reference error, that <code>SomeName</code> is undefined. The function detail seems to work without a problem. Why does <code>detail</code> work but <code>detailplace</code> does not?</p>

<p>HTML</p>

<pre><code>&lt;a href="javascript:detail(123456);"&gt;Details&lt;/a&gt;
&lt;a href="javascript:detailplace(SomeName);"&gt;Details&lt;/a&gt;
</code></pre>

<p>Javascript</p>

<pre><code>function detail(property) {
    var summaryhtml = '&lt;iframe src="' + URL + property + '" width="340px" height="400px" frameborder="0" class="sum_frame"&gt;&lt;/iframe&gt;';
    document.getElementById('itab1').innerHTML = summaryhtml;
}

function detailplace(place) {
    var summaryhtml = '&lt;iframe src="' + URL + place + '" width="340px" height="400px" frameborder="0" class="sum_frame"&gt;&lt;/iframe&gt;';
    document.getElementById('itab1').innerHTML = summaryhtml;
}
</code></pre>

<p>I took your advice and edited the code to include quotes. The problem is that I'm construting the links in javascript. SomeName is defined elsewhere as a string.</p>

<pre><code>link = '&lt;a href="javascript:detailplace(&amp;quot;';
link += SomeName;
link += '&amp;quot;)";&gt;Site Details&lt;/a&gt;';
</code></pre>

<p>What is the right way to escape the quotes within quotes within quotes so I can send the string as a parameter?</p>
