I'm trying to get the text "Student 1, " to display in a text box but also have it as a link back to the student's page.
This code displays only the url I want but not as a link and doesn't display "Student 1 "
function getFavourite()
{
var name = document.createElement('a');
var linkText = document.createTextNode("Student 1, ");
name.appendChild(linkText);
name.title = "Student 1, ";
name.href = "";
$("#output").val($("#output").val() + ' ' + name);
saveFavourites();
loadFavourites();
}
Can anyone help with this?
Thanks.