Dynamic content in javascript
<p>This may be obvious to someone.  I am trying to place a textbox on the screen under a specific circumstance and I am using the following code:</p>

<pre><code>document.getElementById('tbDetails').innerHTML = '&lt;textarea name="taComments" style="height:40px;width:333px" class="f1 greytext" onblur="sb_textarea_onblur(this, \'Check Out Rhapsody Tours\'s Video:\')" onfocus="sb_textarea_onfocus(this, \'Check Out Rhapsody Tours\'s Video:\')"&gt;Check Out Rhapsody Tours's Video:&lt;/textarea&gt;';
</code></pre>

<p>as you can see the text has a apostrophe "Check Out Rhapsody Tours's Video:" which is causing an error.  The text is created dynamically in classic asp so there is no way to tell which information will be displayed.</p>

<p>Other code that may help:</p>

<pre><code>function sb_textarea_onfocus(txt,defaultText)
{
     if(txt&amp;&amp;txt.value == defaultText)
     {
         txt.value = '';
         txt.className = 'f1';
     }
}

function sb_textarea_onblur(txt,defaultText)
{
     if(txt&amp;&amp;txt.value == '')
     {
          txt.value = defaultText;
          txt.className = 'f1 greytext';
     }
}
</code></pre>

<p>I just need a way to correct the javascript to allow apostrophes...  Any idea..</p>

<p>Many thanks in advance,
Paul</p>
