2008-02-28 14:42:56

myparis
» FTalker
FTalk Level: zero
118
0
1969-12-31

Re: [b](UPDATED : NULL PROBLEM, FIXED)[/b] This is another code that i got from [url=http://www.dynamicdrive.com]DYNAMIC DRIVE[/url] just want to share it with u guys. here is the tutorial to apply the

ei this is a double post, another trick like this is already posted last year. by the way.. [quote]var myplace = document.location.href; if (myplace == "http://profiles.friendster.com/user.php?uid=USERID"){ } [color=red]else if (myplace == "http://profiles.friendster.com/user.php?uid=USERID"){ }[/color] else { location.href = "http://whatever.html"; }[/quote] not a good programming practice, just delete the red part because its condition statement is just the same in the first [b]if[/b] statement or just make it simple like this: [quote]var myplace = document.location.href; if (myplace != "http://profiles.friendster.com/user.php?uid=USERID"){ location.href = "http://whatever.html"; }[/quote] or like this: [quote]var myplace = document.location.href; if (myplace == "http://profiles.friendster.com/user.php?uid=USERID"){ [color=red][i]your full javascript codes here...[/i] [i]your full javascript codes here...[/i] [i]your full javascript codes here...[/i] [i]your full javascript codes here...[/i][/color] } else{ location.href = "http://whatever.html"; }[/quote] notice the difference the output is the same but the code i made is much faster than the other one its also a good practice to optimize your codes for better performance.. by the way tnx :D

Last edited by myparis (2008-02-29 01:07:44)

Board footer

© 2024 F Talk

Current time is 00:15

[ 12 queries - 0.074 second ]
Privacy Policy