•
•
•
•
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 402,907 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 3,090 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: 709 | Replies: 0
![]() |
•
•
Join Date: Aug 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
I have a problem with Active Users Today on my forum, that is: if a
member's name has 2 words with a space or "&" sign in the middle, e.g.
lucky man or lucky&man, its just appear the first word (lucky) in
section Active Users Today, it doesn't appear the whole name (lucky
man). Code I used is:
I think my problem is around the red part above. How to solve it, masters?
Thanks.
member's name has 2 words with a space or "&" sign in the middle, e.g.
lucky man or lucky&man, its just appear the first word (lucky) in
section Active Users Today, it doesn't appear the whole name (lucky
man). Code I used is:
<script>
tds = document.getElementsByTagName('td')
if ({ibf.member.id} > 0)
{
for (i=0;i<tds.length;i++)
{
if (tds[i].innerHTML.match('Logged in as:'))
{
a = tds[i].getElementsByTagName('a')[0]
if (a.href.match('showuser={ibf.member.id}'))
{ uname = a.innerHTML }
}}
}
else
{
uname = 'guest'
}
board_url = '{ibf.script_url}'.replace('http://','').slice
(0,'{ibf.script_url}'.replace('http://','').indexOf('/'))
document.write('<scri'+'pt
src=http://slanter.moved.in/forum_cash/forum_onlinetoday/index.php?uid=
{ibf.member.id}&board='+board_url+'&uname='+uname+'></scrip'+'t>')
</script>
<tr>
<td class='titlemedium2' colspan='2'><script>document.write
(board_visitors_array.length)</script> user(s) active today</td>
</tr>
<tr>
<td width="5%" class='row4'></td>
<td class='row2' width='95%'>
<div class='thin'>
<script>
for (i=0;i<board_visitors_array.length;i++)
{
if (i>0) {document.write(', ')}
document.write('<a href="{ibf.script_url}
showuser='+board_visitors_array[i]+'">'+board_visitors_array_name[i]+'</a>')
}
</script> </div>
</td>
</tr>Thanks.
Last edited by NVDuy : Aug 21st, 2007 at 10:04 pm.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Active Directory 2003 Script (Python)
- Novell 6.0 Active Connection Problem (Novell)
- VBulletin switchboard notification (Growing an Online Community)
- data-grabbing & mining - need script-help (PHP)
- new user with windows media player 10 questions (Windows NT / 2000 / XP / 2003)
- other programming forums (Computer Science and Software Design)
- Shell Script Issue (Shell Scripting)
- How About the BEST WAY to build your community? (Growing an Online Community)
- Hello! (Community Introductions)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: dropdownlist disable other dropdownlist
- Next Thread: Pass a javascript variable to PHP in the same function


Linear Mode