tags:

views:

74

answers:

0

I am using the below code to select a fields text with JavaScript but it doesn't quite work:

//auto select that fields text for easy COPY

var content = parent.document.getElementById('share_field_<?php echo $id; ?>');
content.focus();
content.select();

Field to select:

//share field

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