I'm trying to set my text as a link so that when I click on it, it runs a function. Right now I just have it set to google.com to try to get the text to appear as a link, but it doesn't seem to be doing anything at all. It's just static text. Any suggestions?
var leftDiv = document.createElement("div"); //Create left div
leftDiv.id = "left"; //Assign div id
leftDiv.setAttribute("style", "float:left; width:66.5%; line-height: 26px; text-align:left; font-size:12pt; padding-left:8px; height:26px;"); //Set div attributes
leftDiv.style.background = divColor;
a = document.createElement('a');
a.setAttribute('href', 'google.com');
user_name = a.appendChild(document.createTextNode(fullName + ' '));
leftDiv.appendChild(user_name); // Add name to left div
google.comneeds to behttp://google.comfor thehrefto link to Google.a.appendChildreturns the node just appended.