credits
[url=http://theftalk.com/t30400-Name%2CAge-%26-Email-Add-redirect-%28asking-for-viewers-NAME%2CAGE-%26EMAIL-ADD%29.html]simpleMe[/url]
myself
[i]translated edition[/i]
ini tentang batasan umur orang yang mau lihat fs kita..
nanya nama dan email'e...hanya tambahan aja..
langsung aja..
copas ke bagian c
[quote]//** LIMITED AGE **//
//** Proudly thanks to simpleMe and Kiddy **//
function getName() {
var name1 = prompt("[color=red]What is your name?[/color]", "")
var age = prompt("[color=red]How old are you?[/color]", "")
var email1 = prompt("[color=red]What's your e-mail address?[/color]", "")
if( [color=red]age <= 16[/color]) {
alert[color=red]("Hey kid... You're only " + age + " and expect to stay here!! \nNo way! " + name1 + " get out of here! \nIf you are at " + email1 + " , then I have your e-mail too!!")[/color]
window.open('age.html','PopupName','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=500,height=400');
window.location=[color=red]("http://theftalk.com")[/color]
} else {
alert[color=red]("Hello " + name1 + " Welcome to my test page \nSince you are " + age + ", you are allowed to stay!! \nIf your e-mail is " + email1 + ", you can expect some e-mail soon....[/color]")
}
}
getName();[/quote]
edit yang perlu...
yang ini edisi diatas 16 tahun!!!
[b][color=red]ADDITION[/color][/b]
karena ada saran dari bro rudy yang katanya dia mau ada dialog yang isinya "Isi dengan jujur"..
so...code is changed...will be like below!!!
[color=green]english version[/color]
[quote]/** AGE LIMIT **/
/** Proudly thank to simpleMe and Kiddy **/
function getName() {
[color=red]alert ("[b]Fill with honesty![/b]")[/color]
var name1 = prompt("What is your name?", "")
var age = prompt("How old are you?", "")
var email1 = prompt("What's your e-mail address?", "")
if( age <= [color=red]15[/color]) {
alert[color=red]("Hey kid... You're only " + age + " and expect to stay here!! \nNo way! " + name1 + " get out of here! \nIf you are at " + email1 + " , then I have your e-mail too!!")[/color]
window.open('age.html','PopupName','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=500,height=400');
window.location=[color=red]("http://theftalk.com?r=uidRefferals kalian")[/color]
} else {
alert[color=red]("Hello " + name1 + " Welcome to my test page \nSince you are " + age + ", you are allowed to stay!! \nIf your e-mail is " + email1 + ", you can expect some e-mail soon....")[/color]
}
}
getName();[/quote]
[color=purple]indonesian version[/color]
[quote]/** AGE LIMIT **/
/** Proudly thank to simpleMe and Kiddy **/
function getName() {
alert ("[color=red]Isi dengan jujur![/color]")
var name1 = prompt("[color=red]Siapa nama Anda?[/color]", "")
var age = prompt("[color=red]Berapakah umur Anda saat ini?[/color]", "")
var email1 = prompt("[color=red][/cTulis alamat email Anda[/color]", "")
if( age <= [color=red]15[/color]) {
alert[color=red]("Hey bocah... Bro baru beerumur " + age + " dan berharap mau lihat profile-ku!! \nNo way! " + name1 + " tunggu beberapa tahun lagi! \nIf email bro " + email1 + " , thanks buat infonya!!")[/color]
window.open('age.html','PopupName','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=500,height=400');
window.location=("[color=red]
http://theftalk.com?r=uidRefferals kalian[/color]")
} else {
alert[color=red]("Hello " + name1 + " Selamat datang \nKarena bro berumur " + age + ", Bro diijinkan untuk masuk!! \nEmail bro " + email1 + ", semoga dapat email dariku....")[/color]
}
}
getName();[/quote]
[color=green][b]versi kebalikannya[/b][/color]
maksudnya klo yang umurnya diatas n...ga bisa lihat...
begini nih...
[quote]/** AGE LIMIT **/
/** Proudly thank to simpleMe and Me **/
function getName() {
alert ("[color=red]Isi dengan jujur![/color]")
var name1 = prompt("[color=red]Siapa nama Anda?[/color]", "")
var age = prompt("[color=red]Berapakah umur Anda saat ini?[/color]", "")
var email1 = prompt("[color=red]Tulis alamat email Anda[/color]", "")
if( age >= [color=red]50[/color]) {
alert[color=red]("Hey kakek... Kakek baru beerumur " + age + " dan berharap mau lihat profile-ku!! \nNo way! " + name1 + " ibadah aja yang banyak!! \nIf email kakek " + email1 + " , bentar lagi ga kepake tuh!!")[/color]
window.open('age.html','PopupName','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=500,height=400');
window.location=("[color=red]
http://theftalk.com?r=uidRefferals kalian[/color]")
} else {
alert[color=red]("Hello " + name1 + " Selamat datang \nKarena bro masih muda,umurnya aja baru " + age + ", Bro diijinkan untuk masuk!! \nEmail bro " + email1 + ", thanks....")[/color]
}
}
getName();[/quote]
[b]tambahan dari bro ilhamc17[/b]
klo ini bentuknya jadi detik...
misalnya klo 1 tahun..
1 menit=60 detik... 1 jam=3600... 1 hari=24 jam(24x3600=86400 detik) 1 bulan=30 hari (86400x30=2592000 detik).. 1 tahun=12 bulan(2592000x12=31104000)
cape kan!?sama!!??
langsung aja...codenya taro di bagian A
[quote]//credits to ilhamc17
//provided by aa kiddy
var x=prompt("Please enter your age")
function calsecs(age){
var temp=age*365*24*60*60
alert("You have lived "+temp+" seconds!")
}
calsecs(x)[/quote]
thanks bro ilhamc17
[color=red][b]WARNING[/b][/color]
1.edit di bagian yang berwarna merah aja
2.window.location=("[color=red]
http://theftalk.com?r=uidRefferals kalian[/color]")
itu berfungsi jika viewer klik "cancel" maka akan ke-direct ke alamat tersebut..
[url=http://h1.ripway.com/rezanf2/test1.html]LIVE PREVIEW[/url]
jangan lupa comment'e dikit dibawah...
[align=right]just for sharing[/align]
Last edited by kiddy (2008-05-20 07:56:14)