theres somethin wrong with mah code?
can u tell me... where is the wrong part cuz its not workin
[quote]if (!attachOnLoadHandler(function() { REPLACEIT.init(); })) window.onload = function() { REPLACEIT.init(); };
if (typeof REPLACEIT == "undefined" || !REPLACEIT) { REPLACEIT = {}; }
(function() {
REPLACEIT = {
head: [],
init: function() {
//Controlpanel Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/controlpanel/i)[0].getElementsByTagName("h1")[0];
REPLACEIT.head.innerHTML = "ReMonDo";
//Photo Gallery Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/photos/i)[0].getElementsByTagName("h2")[0];
REPLACEIT.head.innerHTML = "Photo Gallery";
//Blogs Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/blogs/i)[0].getElementsByTagName("h2")[0];
REPLACEIT.head.innerHTML = "Blog";
//Moreabout Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/moreabout/i)[0].getElementsByTagName("h2")[0];
REPLACEIT.head.innerHTML = "Moreabout";
//Media Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/scrapbook/i)[0].getElementsByTagName("h2")[0];
REPLACEIT.head.innerHTML = "Media Box";
//Friends Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/friends/i)[0].getElementsByTagName("h2")[0];
REPLACEIT.head.innerHTML = "Friends";
//Fanof Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/fanof/i)[0].getElementsByTagName("h2")[0];
REPLACEIT.head.innerHTML = "Fanof";
//Groups Box Header
REPLACEIT.head = REPLACEIT.getModuleByClassName(/groups/i)[0].getElementsByTagName("h2")[0];
REPLACEIT.head.innerHTML = "Groups";
},
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]
Last edited by moonrays00 (2008-03-29 23:58:21)