Im trying to insert a script

<div class="js-kit-comments" permalink=""></div>
<script src="http://js-kit.com/comments.js"></script> 

into my boards profiles page

<tr>
             <td class="row3" valign='top'><b>Country</b></td>
             <td align='left' class='row1'>Australia</td>
           </tr>
  </table>

board http://inny.ipbfree.com/index.php?

to a particular spot beneath a td (profile field) called 'country'

I cant seem to get it to happen. can anyone help?

code I tried

<script>
//Godkillah, phantom-designs.net
tehsrc='http://js-kit.com/comments.js'
if(location.href.match(/showuser=[0-9]+/i)){script=document.createElement("script");script.src=tehsrc;a=document.getElementsByTagName("td");for(i=0;i<a.length;i++){if(a[i].document.getElementById('td').innerHTML='<div class="js-kit-comments" permalink=""></div>';  && a[i].getElementsByTagName("b")[0].innerHTML=='Country' && a[i].className=='row3'){a[i].appendChild(script);break;}}}
</script>

Edited 3 Years Ago by mike_2000_17: Fixed formatting

In your inner if you have this:

a[i].document.getElementById('td').innerHTML='<div class="js-kit-comments" permalink=""></div>'; && ...

which is doing assignment(single equal sign), not testing(two equal signs). Furthermore, that semicolon should be giving you errors. I believe it should be:

if( a[i].document.getElementById('td').innerHTML=='<div class="js-kit-comments" permalink=""></div>' ...

Tried This But nothing appeared at all

<script>
//Godkillah, phantom-designs.net
tehsrc='http://js-kit.com/comments.js'
if(location.href.match(/showuser=[0-9]+/i)){script=document.createElement("script");script.src=tehsrc;a=document.getElementsByTagName("td");for(i=0;i<a.length;i++){if( a[i].document.getElementById('td').innerHTML=='<div class="js-kit-comments" permalink=""></div>'  && a[i].getElementsByTagName("b")[0].innerHTML=='Country' && a[i].className=='row3'){a[i].appendChild(script);break;}}}
</script>
This article has been dead for over six months. Start a new discussion instead.