JS Problems with quotations: Pass Variable?

JS Problems with quotations: Pass Variable?

Hi Gurus

Basically hardcoded the variable works fine, but I want to pass a variable objectId ( in bold below) where the other bolded text is. I have typed and escaped the characters. I know you need to invert the ' "'s but there are so many and I've tried just about every combination. Where am I going wrong? It's probably something simple but I have been frustrated for about half hour, might go get a coffee and take a break.

Code below. Any help would be appreciated

Thanks, D



  1.   for(var i=0, len=results.length; i<len; i++) {
  2.      var note = results[i];
  3.      var objectId = results[i].id;
  4.                      var obj = {
  5.                       address: note.get('Address'),
  6.                          data: '<a onClick="populateNext(\'tGvHbSBVrj\');"><span style="height:90px; width:40px; float:right;"></a><a style=" text-decoration:none;" onClick="populateNext(\'hi\');"><br> '+objectId+ '<br>Start ' +note.get('readableStartDay')+ '</a><font color="black">End Time' +note.get('readableEndDay'),

  7.                     
  8.                     };
  9.           
  10.                     arr.push(obj);
  11.