I am trying to create a bookmarklet that takes field names and copies them to my clipboard. I am getting the error back Expected an assignment or function call and instead saw an expression.
function copy() {
var number = document.getElementById('sys_readonly.rm_story.number').value,
shortDescription = document.getElementById('rm_story.short_description').value,
d = new Date(),
year = d.getFullYear(),
month = d.getMonth(),
day = d.getDate(),
name = year + month + day + ' - ' + number + ' - ' + shortDescription;
name.select(),
document.execCommand("copy");
}