Tutorial Javascript

Diposting oleh Mizuki Shirosaki

Rabu, 18 Mei 2011

Biar tutorial ini menjadi bikin anda penasaran, coba anda arahkan mouse anda pada text berikut ini.

Cara memasang tooltip dengan javascript

Setelah mouse anda arahkan pada text diatas untuk beberapa saat, maka anda akan melihat sebuah tampilan kotak yang berisi diskripsi yang menjelaskan tentang isi dari text tersebut. Kotak yang muncul inilah yang disebut dengan tooltips. Trus bagaimana cara membuat tooltip seperti diatas? Untuk itu ikuti tutorial ini hingga selesai.

 


Untuk membuat tooltip diatas kita memerlukan kode javascript. Untuk kode scriptnya bisa anda lihat pada kotak dibawah ini.


 


<script type="text/javascript">

/***********************************************

* Cool DHTML tooltip script II- © Dynamic Drive DHTML code library (www.dynamicdrive.com)

* This notice MUST stay intact for legal use

* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code

***********************************************/




var offsetfromcursorX=12 //Customize x offset of tooltip

var offsetfromcursorY=10 //Customize y offset of tooltip

var offsetdivfrompointerX=10 //Customize x offset of tooltip DIV relative to
pointer image

var offsetdivfrompointerY=14 //Customize y offset of tooltip DIV relative to
pointer image

document.write('<div id="dhtmltooltip"></div>') //write out tooltip DIV

document.write('<img id="dhtmlpointer" src="arrow2.gif">') //write out pointer
image




var ie=document.all

var ns6=document.getElementById && !document.all

var enabletip=false

if (ie||ns6)

var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById?
document.getElementById("dhtmltooltip") : ""

var pointerobj=document.all? document.all["dhtmlpointer"] :
document.getElementById? document.getElementById("dhtmlpointer") : ""

function ietruebody(){


return (document.compatMode && document.compatMode!="BackCompat")?
document.documentElement : document.body

}

function ddrivetip(thetext, thewidth, thecolor){

if (ns6||ie){

if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"

if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor

tipobj.innerHTML=thetext


enabletip=true

return false

}

}

function positiontip(e){

if (enabletip){

var nondefaultpos=false

var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;

var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;


//Find out how close the mouse is to the corner of the window

var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20

var winheight=ie&&!window.opera? ietruebody().clientHeight :
window.innerHeight-20



var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX :
winwidth-e.clientX-offsetfromcursorX

var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY :
winheight-e.clientY-offsetfromcursorY



var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000




//if the horizontal distance isn't enough to accomodate the width of the context
menu

if (rightedge<tipobj.offsetWidth){

//move the horizontal position of the menu to the left by it's width

tipobj.style.left=curX-tipobj.offsetWidth+"px"

nondefaultpos=true

}

else if (curX<leftedge)


tipobj.style.left="5px"

else{

//position the horizontal position of the menu where the mouse is positioned

tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"

pointerobj.style.left=curX+offsetfromcursorX+"px"

}

//same concept with the vertical position

if (bottomedge<tipobj.offsetHeight){


tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"

nondefaultpos=true

}

else{

tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"

pointerobj.style.top=curY+offsetfromcursorY+"px"

}

tipobj.style.visibility="visible"

if (!nondefaultpos)


pointerobj.style.visibility="visible"

else

pointerobj.style.visibility="hidden"

}

}



function hideddrivetip(){

if (ns6||ie){

enabletip=false


tipobj.style.visibility="hidden"

pointerobj.style.visibility="hidden"

tipobj.style.left="-1000px"

tipobj.style.backgroundColor=''

tipobj.style.width=''

}

}

document.onmousemove=positiontip

</script>



 


Untuk mengatur bagaimana tampilan tooltip tersebut nantinya, maka disini memerlukan kode style. Kode yang diperlukan seperti berikut ini.


 


<style type="text/css">

#dhtmltooltip{

position: absolute;

left: -300px;

width: 150px;

border: 1px solid black;

padding: 2px;


background-color: #E1EEFD  ; font-family:"Verdana",Arial;font-size:12px;

visibility: hidden;

z-index: 100;

/*Remove below line to remove shadow. Below line should always appear last
within this CSS*/

filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135);

}

#dhtmlpointer{

position:absolute;


left: -300px;

z-index: 101;

visibility: hidden;

}

</style>


 


Kode script dan style diatas sebelumnya letakkan dihosting anda. Jika anda menggunakan blogger, maka anda bisa menggunakan saran untuk meletakkan javascript seperti pada posting solusi hosting javascript di blogger . untuk kode style bisa digabungkan dengan kode style blog di atas </head>.



 


Setelah kode javascript dan style telah diletakkan dengan benar, maka selanjutnya kita meletakkan kode tooltip di tempat yang kita inginkan. Misalnya kita ingin memasang tooltip pada link referral. Dengan begitu akan membuat pembaca lebih tertarik untuk bergabung dengan referral kita.

Misalnya kita ingin meletakkan tooltip di text Cara memasang tooltip dengan javascript. Maka hasilnya menjadi seperti berikut ini.

Kode yang kita pasang pada sebuah link :


 


onmouseover="ddrivetip('tutorial bagaimana memasang sebuah tooltip yang membuat text menjadi lebih menarik.', 240)" onmouseout="hideddrivetip()"


 

keterangan :

merah = text yang kita inginkan muncul di tooltip

Biru = lebar kotak yang kita inginkan

secara keseluruhan kodenya menjadi seperti berikut ini.


 



<a onmouseover="ddrivetip('tutorial bagaimana memasang sebuah tooltip yang membuat text menjadi lebih menarik.', 240)" onmouseout="hideddrivetip()" href="http://www.o-om.com/2010/02/cara-memasang-tooltip-dengan-javascript.html" target="_blank">Cara memasang tooltip dengan javascript</a>

 

jadi kode tersebut bisa kita pasang pada link refferal, banner atau yang lainnya. untuk mengubah warna background kotak tersebut bisa kita lakukan melalui style css diatas.

Akhirnya selesai juga tutorial javasript episode kali ini. semoga tutorial ini bisa berguna untuk anda.

Continue Reading

0 komentar:

Cara Membuat Sub Domain CO.CC

Diposting oleh Mizuki Shirosaki

Mungkin sudah banyak oran-orang yang mengetahui trick ini, sampai-sampai orang yang akan membacanya-pun enggan membaca Artikel tersebut, tapi, yang mereka ajarkan adalah menggunakan dnspark.net yang ada masa expired atau massa berlakunya, meskipun suangat lama, tapi, sewaktu-waktu kita pastinya akan merasa tidak nyaman bukan?


Nah, disini saya ingin memperlihatkan kepada anda bagaimana caranya membuat Sub-Domain langsung didalam Co.cc secara realive, gak percaya ? Simak Gan ( KasKus langue mode : On)


1. Masuk kedalam co.cc dengan Account anda masing-masing di https://www.co.cc/log_in_out/login.php


2. Setelah itu, anda akan disuguhkan dengan sebuah Form yang berisikan 4 alamat domain yang sudah anda buat ( Apabila anda berhasil Login ).


3. Pilih domain yang akan anda jadikan Sub-Domain, disini dan didalam contoh ini, saya akan memakai proxyesterday.co.cc

4. Klik Setup

5. Setelah itu, anda akan disuguhkan Form Setup


6. Klik zone record

7. Didalam Host, isikan apa yang ingin anda jadikan Sub domainnya, misalkan oom

8. Dan otomatis, domain yang akan keluar adalah oom.aktifiskaskus.co.cc

9. Didalam Value, isikan ghs.google.com


10. Klik Setup

11. Berhasil !!!!!


Lalu, apa yang harus kita lakukan selanjutnya?



Setup Sub-Domain didalam Platform kita sendiri, disini saya menggunakan blogspot.com



1. Login kedalam Account Platform anda ( Didalam contoh ini saya menggunakan Blogspot )

2. Setelah berhasil, masuk kedalam menu Pengaturan → Publikasikan dan disana yang harus anda pilih adalah Domain Ubah Suaian


3. Kemudian pilih Beralih ke pengaturan lanjut

javascript:void(0)
4. Masukkan Sub Domain yang sudah anda masukkan dan Setup tadi, yaitu oom.aktifiskaskus.co.cc

5. Masukkan Capcay ( Verifikasi Kata )

6. Klik Simpan Setelan

7. Berhasil !!!!!!!

8. Kemudian klik Lihat Blog

Selamat, Sub-Domain oom.aktifiskaskus.co.cc berhasil dibuat !

*masih dlm perbaikan*

Continue Reading

0 komentar:

Bleach Movie 3 : Fade to Black, I Call Your Name

Diposting oleh Mizuki Shirosaki

Minggu, 13 Maret 2011


Bleach: Fade to Black (BLEACH Fade to Black 君の名を呼ぶ, Burichi: Fade to Black - Kimi no Na o Yobu; Full Japanese title "Bleach Fade to Black, I Call Your Name), is the third film, released in Japan on December 13, 2008, and was released on DVD on September 30, 2009. This film's screenplay was written by Natsuko Takahashi, who is a screenwriter for the anime series. The official film website gives the tagline of "Sayonara, Rukia". Kon has become one of the main characters in the movie.

The movie opens with Mayuri Kurotsuchi in his laboratory, working on something and eventually delighted at its completion: a vial-like object apparently born out of a flower-like being. He, however, immediately senses an intruder, who appears out of thin air behind him and slashes him with a large scythe-like weapon through his neck, though inflicting no damage. However, when Mayuri regains himself immediately, he does not recognize his own laboratory or even Nemu, who tries to comfort and stop him from destroying his control panels in confusion, all the while whining if she is about to capture him. In the ensuing chaos, the mysterious attacker uses the vial-like object to activate a mechanism in the laboratory, which frightens Mayuri into releasing his Ashisogi Jizō.

The mechanism produces snakes of super-dense spiritual particles condensed into white, milk-like liquids that proceed to wreck havoc in Seireitei, engulfing many Shinigami including Kenpachi Zaraki and Tetsuzaemon Iba. Rukia observes this from a distance and tries to hurry to Seireitei, but is stopped by a floating girl dressed in ragged white clothes, who announces that she will erase Rukia's existence. The same attacker as before teleports behind her and slashes her with his scythe, again dealing no damage. The duo mock the destruction of Seireitei, all the while Rukia merely sits unconscious with a blank expression on her face.

Meanwhile, Ichigo finds Kon reading a note from Rukia, but recognizes neither her nor her type of coding she uses. He dismisses this and goes to sleep, but senses Rukia in danger and wakes up, remembering Rukia again. He decodes the letter immediately and learns that Rukia had departed to Soul Society some time ago. Uneasy, he visits Kisuke Urahara, but finds that he had forgotten Rukia and only finds her name on his accounts. He informs Ichigo of the havoc in Seireitei and suggests a connection. Ichigo demands a gate to Soul Society, insisting that Rukia is his "precious comrade."

He and Kon find Seireitei in a mess, its 30% engulfed in cocoon-like substances. He then identifies Shūhei Hisagi and proceeds to question him, but is interrupted by another snake made of spiritual particles summoned by the siblings intending to take Rukia to Rukongai. He initiates Bankai and Hollowfies, slicing the snake in half. The snake, however, forms two heads out of the halves and sprouts wings, now somewhat resembling a manta ray. It proceeds to bash into the gate and break through it. The siblings walk into Rukongai, declaring that this is the path that they and Rukia must take.

Ichigo is confronted by Hisagi and other Shinigami who questions his identity and finds that none of them recognizes him anymore, not even Renji who shows up shortly afterwards. Though he does show signs of remembering Rukia shortly, he nonetheless confronts Ichigo, who, not wanting to fight any of his friends, decides to flee. Ichigo is then confronted by Renji Abarai, who apparently lost his memories of Rukia, and Sajin Komamura who initiates Bankai and attacks him. Ichigo subdues his Bankai with a barrage of Getsuga Tenshō blasts, but is struck by the blade of the falling giant and falls into the underground sewage system. The captains are disturbed by the damage to Seireitei and the unexpected arrival of a drifter who is so well acquainted with them.

Rukia comes to and learns that she is in the 78th district of Rukongai, Inuzuri, none other than where she had grown up in her younger years. She is greeted warmly by the duo, who claim to have been waiting for Rukia to name them all these years. She does remember that she had indeed promised to name them and even had already thought of them, but is surprised when the girl demands to know their names, thinking she had given them names. She searches her memories in vain, unable to recall the names. She questions what she had been doing all these years while the siblings waited, and is replied by the boy that she had been sleeping, but not before the girl hesitates.

Ichigo wakes up and finds that he had been healed by Hanataro Yamada, who momentarily thinks he remembers healing him some time ago (as he indeed had) but backs out immediately, claiming he was merely imagining it. He infiltrates the Kuchiki mansion, where Byakuya Kuchiki is disturbed by the signs of someone else having been openly using the mansion. He finds Byakuya standing before a photograph of Hisana Kuchiki, whom Kon mistakes as Rukia. Ichigo, acknowledging it is Hisana, attempts to remind Byakuya of Rukia, but in vain. Byakuya's servant sees this and summons other Shinigami and Renji arrives in the scene and begins to assault Ichigo. Ichigo, however, knowing that Renji is not the type to be persuaded with words, initiates Bankai and easily overpowers him, though not before Renji momentarily remembers Ichigo raising his sword when he sees Ichigo doing the same. Byakuya attempts to intercept, but decides against it and informs him that Hisana is from the 78th district of Rukongai, earning a thanks.

Renji recovers and is visited by Zabimaru (in the ape form), who berates him for forgetting everything, including his training to achieve Bankai in order to save Rukia and his fight with Zangetsu, to his surprise.

Ichigo and Kon eventually locate Rukia at a cliff mourning for her deceased companions by their senses of smell, but find to their shock that she does not remember them either, instead being hostile. The siblings confront them, and Rukia develops a headache when he mentions his name and has a series of flashbacks. This prompts the male sibling to assault them, displaying some surprising powers including teleportation and the ability with his scythe to cut through Zangetsu without damaging it. The siblings decide to call off and retreat, while the female shows signs of black aura emanating from her. Rukia, confused that she knows Ichigo, demands to know what she had truly been doing all the while, and is answered by the crying girl that they had no idea, having been away for a hundred years.

Ichigo is depressed, having hoped that at least Rukia would remembered him. This causes Kon to show his anger and disappointment in him, reminding him that he had sensed Rukia even in his world. When he returns after setting out to find Rukia by himself, he is thanked by the rejuvenated Ichigo. They are, however, attacked by Tōshirō Hitsugaya, Ikkaku Madarame and Yumichika Ayasegawa, who attack them after confirming that Ichigo knows all their names. He deftly defends himself against Ikkaku's attacks obviously familiar with his styles from their first duel. Tōshirō jumps into the fight and does overpower Ichigo with his binding spell, but is interrupted by Renji.

Renji intercepts Tōshirō's attack and frees Ichigo, but is immediately angered to have his first name called by Ichigo. He states that despite his head knowing that Ichigo is an enemy of a Seireitei, his soul is saying against it, and declares to follow as his soul dictates. He then requests Tōshirō to let Ichigo leave, but is interrupted by none other than the Captain-Commander Genryūsai Shigekuni Yamamoto with the high-ranking captains. He refuses to listen to anything against him and orders that Ichigo be captured, but this time Kisuke Urahara and Yoruichi Shihōin appears in the fray and intercepts the Shinigami. He urges that Ichigo hurry to save Rukia, and proceeds to explain everything.

Not long after he had opened the Shinigami Research & Development Institute, he had researched a peculiar Hollow with the ability to parasitically possess a soul and destroy memories with the scythe-like tail it possesses, which is very similar to the male sibling's scythe. However, considering that its powers were minuscule and certainly not enough to possess a Shinigami, let alone erase her entire existence, thus implying that there are more powers in play. He reveals that memories are connected and that there are some kinds of bonds between individuals, meaning if someone's memories are erased, anything related to that person also completely disappears from everyone else's memory, which is why no one, not even Byakuya and, temporarily, Ichigo, had forgotten about Rukia, and admits that he, too, had done so. He also reveals that the only exception (other than Kon), Ichigo, exists because his powers were originally given by Rukia, and thus everyone had forgotten about him as well. When questioned by Tōshirō, he further reveals that Mayuri was forgotten by no one simply because of his modifications: he had a separate brain in which he had been doing back-ups of his memories.

In Rukongai, Renji questions Ichigo on why he is so intent in helping Rukia, to which Ichigo repies that it is her who had changed his life completely and that it is thanks to her that he is here. Renji then recalls about Rukia upon hearing the word 'water' form a merchant: he had met Rukia while trying to steal water from an outraged man. Ichigo is delighted and demands that he remembers her, if it takes repeating her name hundreds of times. Ichigo and Renji locate Rukia in the 12th squad barracks in Mayuri's laboratory. Rukia comes to and questions their goals, to which the girl replies that they plan to 'banish' all the Shinigami who torment Rukia and them. When Rukia tries to defend the Shinigami, she is angered at the idea of the Shinigami taking Rukia away from her again, and her powers start going out of control and ripping out entire buildings into another dimension and conjuring them randomly in Seireitei, causing some destruction. To Ichigo's surprise, Renji successfully initiates Bankai to defend himself and takes them to Rukia in a short time.

Ichigo confronts the siblings and angrily demands that Rukia remembers herself, declaring that Rukia, a strong-willed person who had risked her life to save a complete stranger, is not someone who would so easily abandon her Shinigami status, not even forcibly. The girl, while trying to convince Rukia not to listen to him, has a slip of tongue and reveals to her that she was indeed a Shinigami. Angry with her, Rukia demands Ichigo to repeat his name for her, to which he complies. She finally remembers her first encounter with Ichigo and him rescuing her before her execution and chokes out the name Ichigo, which enrages the girl and sends her powers berserk. She, deciding that the siblings must always be the only ones precious to Rukia, comes to the decision that they had so avoided, knowing that it would destroy Rukia as well: fusing with Rukia into the twisted Hollow-like form of Rukia, referred to as Dark Rukia, shown above.

Dark Rukia uses the vial-like object to release even more spiritual particles into Seireitei and start its full-scale destruction, which prompts the captains into a fight. Renji joins in the fight while Ichigo engages Rukia in a single combat. Rukia gains a far superior hand due to Ichigo not willing to fight her at all, only blocking her attacks and trying to talk her out of it, to no avail. Eventually she mutates into a form with empty eyeholes and further overpowers Ichigo, nearly severing his head when Byakuya interrupts the fight and binds her with his spell. Upon seeing Rukia and seeing Hisana's face in hers, he decides that if what Ichigo had informed him is true, he must be the one to exterminate Rukia. Ichigo protests that Rukia is still in there and that the bond between him and her will never break. As Rukia Hollowfies further, the binding spell breaks and Renji notes that she is going beyond help. However, Ichigo is reminded of his first encounter with her, upon seeing Kon begging Ichigo to save Rukia, where she had asked Ichigo if he wanted to save his family, and decides that it is his turn to give Rukia the powers of Shinigami. As Rukia breaks free and declares to butcher Ichigo, she and Ichigo clash for the last time and Ichigo easily impales Rukia with Zangetsu, much to Renji's and Byakuya's shock. However, it separates Rukia from the siblings while killing the Hollow that had been inside them.

This finished, Byakuya and Renji easily destroy the monster and return to Ichigo and Rukia. Rukia rushes to the siblings who feel punished for lying to Rukia. The Hollow destroyed, Rukia finally remembers the day that the siblings were separated from her: a Shinigami possessed by the Hollow were trying to assault the siblings. As Rukia used her spiritual powers to fend him off, the Hollow took interest in her power and wanted control over it, ready to possess her. The girl rose, however, and attacked the Shinigami's leg with his own Zanpakutō, drawing his attention again. The last thing Rukia saw was the Shinigami advancing towards a siblings and a spurt of blood. As Urahara reveals, this bit of memory was erased from Rukia all this time. The siblings, as they were slashed, forcibly drew the Hollow into themselves and died, and the Hollow teleported to Hueco Mundo in surprise of possessing dead souls. However, there they eventually forced the Hollow's power into their submission and, with their unique dimensional teleport ability and the sheer desire to reunite with Rukia, eventually returned to Soul Society.

As the siblings apologize and admit that they died that day, Rukia protests and suggests that death is never the end, and that they had returned for her and made her happy, and when they say that they returned only to meet her again, that Rukia was all that they had, she denies this, reminding them that the most precious ones to them were, all this time, none other than each other. She then remembers the names she had intended to give them: the girl Homura and the boy Shizuku. The siblings, very content with their names and the realization, die happily, with Rukia wailing into the rain.

She is later seen on the cliff again, and is greeted by Ichigo. He, after informing her that he will be returning home, suggests that just like death is never the end as Rukia said, it would be possible that the bond between them was not formed the first time they met, but long, long ago. He muses that a bond, once formed, will never disappear, and suggests that she would one day chance upon Homura and Shizuku later even if she were to forget everything again (possibly meaning reincarnation). He then bids her a goodbye, referring her as Shinigami, and Rukia answers with the very same words she had said the night they first met: "Don't call me a Shinigami. I'm Kuchiki Rukia."

At the end of the credits, Kon is shown to still be encased in crystal at the battleground. He is sobbing and asking why Rukia and now Ichigo have forgot him before he manages to free himself.

Continue Reading

0 komentar:

Cool Clock & Calendar 2