You need to sign in to do that
Don't have an account?
Irish2013
anchor tag through Jscript
Hello Dev,
I'm trying to create a link in Table data in Vf page but, I'm unable to populate the same.
var content = '<table >';
for(var i=0; i<defaults.length; i++){
content += '<td>';
content += '<a href=/+defaults[i].Id>'+defaults[i].Name+'</a>'; // Trying to make the data as a link...
content +='</td>';
}
content += '</table>';
Td value is coming as a link but URL is coming like tes.salesforce.com/+defaults[i].Name
it's not taking the value but taking as a string, I can understand that the anchor tag is being used in single quotes.
Is there anyways we can populate this a link.
I'm trying to create a link in Table data in Vf page but, I'm unable to populate the same.
var content = '<table >';
for(var i=0; i<defaults.length; i++){
content += '<td>';
content += '<a href=/+defaults[i].Id>'+defaults[i].Name+'</a>'; // Trying to make the data as a link...
content +='</td>';
}
content += '</table>';
Td value is coming as a link but URL is coming like tes.salesforce.com/+defaults[i].Name
it's not taking the value but taking as a string, I can understand that the anchor tag is being used in single quotes.
Is there anyways we can populate this a link.
Thanks