I have the following code:
[CODE]<!– Add Lifestyle Logo –>
<script type=”text/javascript”>
var words={
‘Exclusive Lifestyle Family Fitness Offer’:’Exclusive Lifestyle Family Fitness Offer! <img src=images/logos/lifestyle_fitness_logo_tiny.jpg>’
}
var regs=[];
for(arg in words){regs[regs.length]=new RegExp(arg,’g’)}
<!–[if IE]> window.onload += <![endif]–>
function replaceText(){
var tags=document.getElementsByTagName(‘body’)[0].getElementsByTagName(‘*’);
var i=0,t;
while(t=tags[i++]){
if(t.childNodes[0]){
var j=0, c;
while(c=t.childNodes[j++]){
if(c.nodeType==3){
var k=0;
for(arg in words){
c.nodeValue=c.nodeValue.replace(regs[k],words[arg]);
k++;
}
}
}
}
}
}
</script>
All it does is output text blah blah <img src=””> instead of showing the text and displaying the image.. is there a way to get this to work?
Thanks!