Pages: 1..123456789101112

  2008-03-29 23:57:15

moonrays00
» FTalkAddict
FTalk Level: zero
343
0
1969-12-31

Re: the codes are possibly obselete [spoiler][quote][b][color=red]For educational purposes only.[/color][/b][/quote] An alternative code for customize header names I made a [b]simple code[/b] & now the co

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)

Pages: 1..123456789101112

Board footer

© 2024 F Talk

Current time is 00:27

[ 12 queries - 0.012 second ]
Privacy Policy