•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 331,543 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,664 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 578 | Replies: 2
![]() |
Im trying to insert a script
into my boards profiles page
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
<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> Last edited by Inny : Mar 28th, 2008 at 11:18 pm.
Always carry a flagon of whiskey in case of snakebite and furthermore always carry a small snake.
W. C. Fields
W. C. Fields
•
•
Join Date: Dec 2007
Posts: 75
Reputation:
Rep Power: 1
Solved Threads: 10
In your inner if you have this:
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:
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> Always carry a flagon of whiskey in case of snakebite and furthermore always carry a small snake.
W. C. Fields
W. C. Fields
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Marketplace (Sponsored Links)
- Mouse Over ToolTip Help (JavaScript / DHTML / AJAX)
- php script for dropdown to fetch DB list and then Tables (PHP)
- load a script if its a only if its certain time and day (JavaScript / DHTML / AJAX)
- how to use a javascript menu in asp.net (ASP.NET)
- Help with .js JAVASCRIPT file!!!!!?!!?!? (JavaScript / DHTML / AJAX)
- JavaScript's window.opener (JavaScript / DHTML / AJAX)
- converting from javascript to HTML? (Java)
- small project hire : javascript foraddition to rte editor (Software Development Job Offers)
- embedding java script in php (PHP)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Company Merchandise Order Form
- Next Thread: Imagemap Menu Need help


Linear Mode