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
- for(var i=0, len=results.length; i<len; i++) {
- var note = results[i];
- var objectId = results[i].id;
- var obj = {
- address: note.get('Address'),
- 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'),
-
- };
-
- arr.push(obj);
-