[quote=zotic]all bole nanya ga ?? maksudnya bagia C/B ntu yg mana ya ???[/quote]
ni bro mksud na..
ni contoh JS
[spoiler] [b]BAGIAN A[/b]
//onload handler
function onProfileLoad() {
//addboxes here
[b]BAGIAN B[/b]
}
if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()};
function addBox (type,head,htm,id,sibling) {
//by marfillaster
//type "LEFT" | "RIGHT"
//head header string
//htm innerHTML string
//id css_id string
//sibling css_id_insertbefore string | null
/* Available default Siblings
LEFT
0 = controlpanel
1 = photos
13 = blogs
12 = reviews
6 = moreabout
18 = publiccomments
10 = scrapbook
RIGHT
15 = meettrail
2 = friends
14 = googleads
7 = fan
8 = groups
null - appends to last
*/
try {
var li=document.createElement("li");
} catch(e) {
var li=document.createElement("<li>");
}
if(type=="LEFT") {
var ul=document.getElementById("0").parentNode.parentNode;
htm="<div class='boxcontent'>"+htm+"</div>";
}
else var ul=document.getElementById("2").parentNode.parentNode;
li.innerHTML="<div id='"+id+"' class='commonbox "+id+"'>"+
"<h2>"+head+"</h2>"+
"<div id='content_"+id+"'>"+
htm+
"</div>"+
"</div>";
if(sibling==null) ul.appendChild(li);
else {
sibling=document.getElementById(sibling).parentNode;
ul.insertBefore(li,sibling);
}
}
[b]BAGIAN C[/b][/spoiler]
selengkap nya baca di sini
[url=http://theftalk.com/t15339-%7BTUTORIAL%7D-Kombinasi-JS-dan-WVM-%2B-Addbox-%28UPDATE-08-03-08%29.html]klik aja[/url]
Last edited by aaf (2008-05-18 03:48:42)