Re: :arrow: DELETED
[b]@kyosuke1981[/b]
It won't work on you because you did it wrong.
It should be:
[quote]if ( ! attachOnLoadHandler(function () { loadBox();}))
window.onload = function () { loadBox();};
function loadBox() {
var chatbox="<div align='center' id='cboxdiv'>"+
"<iframe frameborder='0' width='160' height='183' src='http://www3.cbox.ws/box/?boxid=2727332&boxtag=9402&sec=main' marginheight='2' marginwidth='2' scrolling='auto' allowtransparency='yes' name='cboxmain' style='border:#000000 1px solid;' id='cboxmain'></iframe><br/>
<iframe frameborder='0' width='160' height='197' src='http://www3.cbox.ws/box/?boxid=2727332&boxtag=9402&sec=form' marginheight='2' marginwidth='2' scrolling='no' allowtransparency='yes' name='cboxform' style='border:#000000 1px solid;border-top:0px' id='cboxform'></iframe>
</div>";
[color=red][b]addNewBox.HTML("The Chatbox",chatbox,"chatbox",/friends/i,"below");[/b][/color]
var music3p="<embed src='http://player.stickam.com/stickamPlayer/174310668-1836039' type='application/x-shockwave-flash' width='160' height='400' scale='noscale' allowScriptAccess='always'></embed>';
[color=red][b]addNewBox.HTML("MUSIC3",music3p,"music3p",/groups/i,"below");[/b][/color]
}
if (typeof addNewBox == "undefined") { addNewBox = {}; }
addNewBox = {
//addNewBox v2.2
/*
header: HTML string name
null - no header
x: "above" - HTML string: at the above of sibling box
"below" - HTML string: at the below of sibling box
null - HTML string: at the very bottom of box
sibling:- /controlpanel/i
- /photos/i
- /blogs/i
- /reviews/i
- /moreabout/i
- /publiccomments/i
- /scrapbook/i
- /meettrail/i
- /friends/i
- /ads/i
- /fanof/i
- /groups/i
*/
li: [], ul: [],
HTML: function(head,code,id,sibling,x) {
this.li = document.createElement("LI");
if (!head) head = "";
else head = "<h2>"+head+"</h2>";
this.li.innerHTML = "<div class=\"commonbox "+id+"\" id=\""+id+"\">"+
head+
"<div id=\"content_"+id+"\">"+
code+
"</div>"+
"</div>";
if (!x) this.getModuleByClassName(sibling)[0].parentNode.parentNode.appendChild(this.li);
else if (x == "below") this.getModuleByClassName(sibling)[0].parentNode.appendChild(this.li);
else if (x == "above") {
this.ul = this.getModuleByClassName(sibling)[0];
this.ul.parentNode.parentNode.insertBefore(this.li,this.ul.parentNode);
}
},
getModuleByClassName: function(sClass) {
var elm = [];
var els = document.getElementsByTagName("*") || document.all;
for (var j=0,k=els.length;j<k;j++) {
if (new RegExp(sClass).test(els[j].className))elm.push(els[j]);
}
return elm;
}
};[/quote]
Observe well on the red color. You've also use the old div id's....[b]Always refer on the given siblings by Feruzz inside his addNewBox Function.[/b]