[b]added:[/b]

[b]what is onloadHandler?[/b]
this is the simple explanation.
onloadhandler just this simple codes:
[quote][color=red]function[/color] [color=#C28547]onProfileLoad()[/color] [color=red]{[/color]
[color=green]//CODES INSIDE ONLOADHANDLER[/color]
[color=red]}[/color]
[color=blue]if (!attachOnLoadHandler(function(){[/color][color=#C28547]onProfileLoad()[/color][color=blue]})) window.onload = function(){[/color][color=#C28547]onProfileLoad()[/color][color=blue]};[/color][/quote]
[color=red]RED[/color] = the function
[color=#C28547]BROWN[/color] = name of the function
[color=green]GREEN[/color] = codes inside onload function
[color=blue]BLUE[/color] = calling the function to load the codes inside it when your profile completely loaded.
[quote][li]Q: Where the blue come from?[/li]
[li]A: attachOnLoadHandler is also a function, one of [url=http://images.friendster.com/200706A/js/friendster_v1.js]friendster's js[/url] already does have this function so we do no longer need to copy the whole attachOnloadhandler code. in the code above, we only called it and passed a parameter.[/li]
[li]Q: Can i make another function for another codes?[/li]
[li]A: Sure, you can put a different name of the function. ex: [b][color=red]function [/color][color=#C28547]kherNavarro ()[/color] [color=red]{[/color][/b]. You can read the full tutorial here: [url=http://theftalk.com/t5163-javaScript-Functions-explained.html]CLICK ME![/url][/li][/quote]
correct me if i am wrong.
Last edited by KhErMiNaToR (2008-07-18 23:28:35)