selecting field text with javascript
<p>I am using the below code to select a fields text with JavaScript but it doesn't quite work:</p>

<pre><code>//auto select that fields text for easy COPY

var content = parent.document.getElementById('share_field_&lt;?php echo $id; ?&gt;');
content.focus();
content.select();
</code></pre>

<p>Field to select:</p>

<p>//share field</p>

<pre><code>echo '&lt;div class="name" style="display: none" id="share_field_'.$row['id'].'"&gt;&lt;input name="share" type="text" value="http://www.site.com/play/'.$row['id'].'" size="53"&gt;&lt;/div&gt;';
</code></pre>
