hi...pls help me..codes do work but my groupbox disappear...what coud be the reason? I followed the instruction and succesfully generated the codes in marfillaster addbox gen... and its good coz i have my chatbox under friends list. but the problem is my groupbox disappear. this are the codes pasted in my js file. pls have it check for me. thanks (note: placement of chatbox- google ads, hide google ads in css file)
//onload handler
function onProfileLoad() {
//insert generated boxes here
var header="Mary Ann's Chatbox";
var code="<!-- BEGIN CBOX -
www.cbox.ws -->"+
"<div align=\"center\" id=\"cboxdiv\">"+
"<iframe frameborder=\"0\" width=\"160\" height=\"305\" src=\"http://www3.cbox.ws/box/?boxid=2886360&boxtag=tx0tc3&sec=main\" marginheight=\"2\" marginwidth=\"2\" scrolling=\"auto\" allowtransparency=\"yes\" name=\"cboxmain\" style=\"border:#9900FF 1px solid;\" id=\"cboxmain\"></iframe><br/>"+
"<iframe frameborder=\"0\" width=\"160\" height=\"75\" src=\"http://www3.cbox.ws/box/?boxid=2886360&boxtag=tx0tc3&sec=form\" marginheight=\"2\" marginwidth=\"2\" scrolling=\"no\" allowtransparency=\"yes\" name=\"cboxform\" style=\"border:#9900FF 1px solid;border-top:0px\" id=\"cboxform\"></iframe>"+
"</div>"+
"<!-- END CBOX -->";
addBox(header,code,"custombox_839",/standalonebox[\s]*?ads/i);
}
if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()};
function addBox(head,code,id,siblingafter) {
/*
head:
html string title
null - no header bar
code:
html string content
id:
unique string css pointer
siblingafter:
regexp classname
'left' - mainbar column end
'right' - sidebar column end
*/
try {
var li=document.createElement("li");
} catch(e) {
var li=document.createElement("<li>");
}
if(!head) head="";
else head="<h2>"+head+"</h2>";
li.innerHTML="<div id=\""+id+"\" class=\"commonbox "+id+"\">"+
head+
"<div id=\"content_"+id+"\">"+
code+
"</div>"+
"</div>";
if(siblingafter=="left") getElementsByClass(/commonbox[\s]*?controlpanel/i,null,"DIV")[0].parentNode.parentNode.appendChild(li);
else if(siblingafter=="right") getElementsByClass(/commonbox[\s]*?friends/i,null,"DIV")[0].parentNode.parentNode.appendChild(li);
else {
var si=getElementsByClass(siblingafter,null,"DIV")[0];
si.parentNode.parentNode.insertBefore(li,si.parentNode);
}
}
function getElementsByClass(searchClass,node,tag) {
var classElements = new Array();
if ( node == null )
node = document;
if ( tag == null )
tag = '*';
var els = node.getElementsByTagName(tag);
var elsLen = els.length;
var pattern = new RegExp(searchClass);
for (i = 0, j = 0; i < elsLen; i++) {
if ( pattern.test(els[i].className) ) {
classElements[j] = els[i];
j++;
}
}
return classElements;
}
function shoutoutcus(){
var wakoko="<div align='left'><font color= #800080>My Navigation:</font></div> <marquee style='width:85%px;border:2px solid #800080; direction='left' scrollamount='2' onmouseover='this.stop()' onmouseout='this.start()'><input type='button' value='Home' style='background-color:#ff99cc;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#800080;' onClick=\"top.location.href='http://friendster.com'\"> <input type='button' value='My Profile'style='background-color:#ff99cc;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#800080;' onClick=\"top.location.href='http://profiles.friendster.com/user.php'\"> <input type='button' value='My Friends'style='background-color:#ff99cc;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#800080;' onClick=\"top.location.href='http://friendster.com/friends.php'\"> <input type='button' value='Explore'style='background-color:#ff99cc;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#800080;' onClick=\"top.location.href='http://www.friendster.com/explore.php'\"> <input type='button' value='Search'style='background-color:#ff99cc;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#800080;' onClick=\"top.location.href='http://friendster.com/gallery.php'\"> <input type='button' value='Invite'style='background-color:#ff99cc;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#800080;' onClick=\"top.location.href='http://friendster.com/invite.php'\"> <input type='button' value='Messages'style='background-color:#ff99cc;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#800080;' onClick=\"top.location.href='http://friendster.com/messages.php'\"> <input type='button' value='Settings'style='background-color:#ff99cc;border:none;font-family:georgia MS;font-weight:bold;font-size:12;color:#800080;' onClick=\"top.location.href='http://friendster.com/editaccount.php'\"> <input type='button' value='Log Out'style='background-color:#ff99cc;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#800080;' onClick=\"top.location.href='http://friendster.com/logout.php'\"> </marquee><br><div align='left'><font color= #800080><strong>Hi</font></strong> <b><font color= red><strong>"+pageViewerFName+"</strong></color></b><br><font color= #800080><strong>your ID is </strong></font><b><font color=red><strong>"+pageViewerID+"</strong></color></font><br><strong><font color=#800080>and the time and date there is</font> <font color='red'>"+Date()+"</font></strong><br><font color=#800080>your browser is </font><font color=red>"+navigator.appName+" "+navigator.appVersion+"</font></color><br><font color= #800080><strong>Welcome to</strong></font><font color=red><strong><blink> My Page.</blink></font></strong><font color=#800080><strong> Enjoy viewing my profile!</strong></font><br><font color= #800080><strong>Drop some comment for me, thanks...</font></strong><br></div>";
document.getElementById('cpShoutoutBox').style.height='260';
document.getElementById('cpShoutoutBox').style.overflow='auto';
document.getElementById('cpShoutoutBox').innerHTML="<table width='100%'><tr><td align='center'>"+wakoko+"</td></tr></table>";
}setTimeout("shoutoutcus()",1000);