[b]credit by :[/b]

[url=http://www.dynamicdrive.com/]dynamicdrive[/url]

[url=http://profiles.friendster.com/anoer]Noel[/url]
Pertama-tama mohon izin kepada modz... klo tread ini tidak berguna silahkan delete

Jangan langsung Copas script di bawah ini, edit bagian yang bercetak tebal
dan masukan ke dalam JS kalian, [b]bagian C[/b]
[spoiler]////////////////////POPUPBOX///////////////////
var div = document.createElement("div");
div.innerHTML = "<div id=\"showimage\" style=\"position:absolute;width:250px;left:250px;top:250px\"><table border=\"0\" width=\"250\" bgcolor=\"#4d4d4d\" cellspacing=\"0\" cellpadding=\"2\">"+
"<tr>"+
"<td width=\"100%\"><table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\""+
"height=\"36px\">"+
"<tr>"+
"<td id=\"dragbar\" style=\"cursor:hand; cursor:pointer\" width=\"100%\" onMousedown=\"initializedrag(event)\"><ilayer width=\"100%\" onSelectStart=\"return false\"><layer width=\"100%\" onMouseover=\"dragswitch=1;if (ns4) drag_dropns(showimage)\" onMouseout=\"dragswitch=0\"><font face=\"Verdana\""+
"color=\"#FFFFFF\"><strong><small><center>[b]Nama Box[/b]</center></small></strong></font></layer></ilayer></td>"+
"<td style=\"cursor:hand\"><a href=\"#\" onClick=\"hidebox();return false\"><img src=\"http://i36.photobucket.com/albums/e11/anoer/close_button1.gif\" width=\"17px\" height=\"17px\" border=0></a></td>"+
"</tr>"+
"<tr>"+
"<td width=\"100%\" bgcolor=\"#000000\" style=\"padding:4px\" colspan=\"2\">[b]<div align='center' id='cboxdiv'>"+
"<center><form name='message_form' action='http://www.friendster.com/sendmessage.php' method='post' onsubmit='this.onsubmit = new Function('return false');'><input type='hidden' name='_submitted' value='1'><input type='hidden' name='msg_type' value=''><input type='hidden' name='uid' value='"+pageOwnerID+"'><table class='formtable'><tr><td class='field'><label for='subjectfield'></label></td><td class='value'><span class='field'>Subject:</span><br><input id='subjectfield' type='text' name='subject' size='25' maxlength='100' class='subjectfield'></td></tr><tr><td class='field'><label for='messagefield'></label></td><td valign='top' class='value'><span class='field'>Message:</span><br><textarea id='messagefield' name='message' rows='10' cols='21' wrap='hard' class='messagefield'></textarea><input readonly type='hidden' name='inputcount' size='5' maxlength='4' value='100'></td></tr><tr><td class='field'></td><td class='value'><input type='checkbox' name='savetosent' value='y'>Save a copy in your Sent folder<br><input type='submit' name='Submit' onMouseOver='window.status='Send';return true;' value='Send'></td></tr></table></form></center>[/b]"+
"</tr>"+
"</table>"+
"</td>"+
"</tr>"+
"</table>"+
"</div>";
document.getElementsByTagName("body")[0].appendChild(div);
var ns4=document.layers
var ie4=document.all
var ns6=document.getElementById&&!document.all
var dragswitch=0
var nsx
var nsy
var nstemp
function drag_dropns(name){
if (!ns4)
return
temp=eval(name)
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
temp.onmousedown=gons
temp.onmousemove=dragns
temp.onmouseup=stopns
}
function gons(e){
temp.captureEvents(Event.MOUSEMOVE)
nsx=e.x
nsy=e.y
}
function dragns(e){
if (dragswitch==1){
temp.moveBy(e.x-nsx,e.y-nsy)
return false
}
}
function stopns(){
temp.releaseEvents(Event.MOUSEMOVE)
}
function drag_drop(e){
if (ie4&&dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx
crossobj.style.top=tempy+event.clientY-offsety
return false
}
else if (ns6&&dragapproved){
crossobj.style.left=tempx+e.clientX-offsetx+"px"
crossobj.style.top=tempy+e.clientY-offsety+"px"
return false
}
}
function initializedrag(e){
crossobj=ns6? document.getElementById("showimage") : document.all.showimage
var firedobj=ns6? e.target : event.srcElement
var topelement=ns6? "html" : document.compatMode && document.compatMode!="BackCompat"? "documentElement" : "body"
while (firedobj.tagName!=topelement.toUpperCase() && firedobj.id!="dragbar"){
firedobj=ns6? firedobj.parentNode : firedobj.parentElement
}
if (firedobj.id=="dragbar"){
offsetx=ie4? event.clientX : e.clientX
offsety=ie4? event.clientY : e.clientY
tempx=parseInt(crossobj.style.left)
tempy=parseInt(crossobj.style.top)
dragapproved=true
document.onmousemove=drag_drop
}
}
document.onmouseup=new Function("dragapproved=false")
function hidebox(){
crossobj=ns6? document.getElementById("showimage") : document.all.showimage
if (ie4||ns6)
crossobj.style.visibility="hidden"
else if (ns4)
document.showimage.visibility="hide"
}[/spoiler]
Okey langsung aja saya akan jelaskan fungsi dari script ini :
Kita bisa memasukan object apa aja ke dalam popup box.
di sini saya mengambil contoh box private message
untuk memudahkan kalian memahaminya ketika melihat prepiunya.
liat bagian code yang bercetak [b]tebal[/b], di situ kalian bisa memasukan object apa aja, embed clock, calendar, cbox ataupun sekedar kata2, pesan dll.
[quote][b]Contoh: kalian ingin memasukan embed jam sebagai objectnya jadinya seperti ini[/b]
"<tr>"+
"<td width=\"100%\" bgcolor=\"#000000\" style=\"padding:4px\" colspan=\"2\">[b]<embed src=\"http://www.clocklink.com/clocks/0016-pink.swf?TimeZone=Indonesia_Jakarta&\" width=\"200\" height=\"200\" wmode=\"transparent\" type=\"application/x-shockwave-flash\">[/b]"+
"</center></td></tr></table></form></center><br></div></td>"+
"</tr>"+[/quote]

[url=http://h1.ripway.com/noellagi/gridle.html]PREPIU[/url]
Last edited by anoer (2008-10-05 19:12:33)