warrenw
05-13-2009, 06:33 PM
I am trying to insert the value of an array element into a string, then display the string on screen...simple right?! (What I thought too until I tried it in FF).
Here's the basic premise (simplified for posting):
var title = tiptitlesA[tipId[x].firstChild.nodeValue].toString();
var html = '<div id="tiptitle" style="text-decoration:underline;"><h3>' + title + '</h3></div>';
document.getElementById(tgtDiv).innerHTML = html;
This works fine in IE, but I cannot seem to get FF to output anything other than [object text]. Can someone please square me away with what I need to do about this?! :confused:
Here's the basic premise (simplified for posting):
var title = tiptitlesA[tipId[x].firstChild.nodeValue].toString();
var html = '<div id="tiptitle" style="text-decoration:underline;"><h3>' + title + '</h3></div>';
document.getElementById(tgtDiv).innerHTML = html;
This works fine in IE, but I cannot seem to get FF to output anything other than [object text]. Can someone please square me away with what I need to do about this?! :confused: