============================================================
Script: Ask Visitor For Name Script
Functions: A very simple paste-it-in script that asks the
vistor for his or her name when entering your
page, then prints a "Hello" welcome message
anywhere you wish in the body of the page.
If the visitor does not type in a message,
a default message shows, instead. Very easy
install for JavaScript newcomers.
Browsers: NS3-6, IE4-6
Author: etLux
============================================================
INSTRUCTIONS:
Paste the following <script> ... </script> block into the
<body> (notice we said the body, *not* the <head>) of
your page, exactly where you would like the message to
appear.
<script>
// (C) 2001 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header
var whatName=prompt("Please type in your name:","");
function doName(theName){
if ((whatName != "")&&(whatName !=null)){
// you can modify this as needed
// this is the message if a name is typed in
document.writeln("Hello "+whatName+"!. Welcome To EG Layouts. ")
}else{
// you can modify this as needed
// this is the message if a name is *not* typed in
document.writeln("Hello!")
}
}
doName(whatName);
</script>
============================================================
Design Notes:
1.
When you use an in-the-body script like this, you will
usually want to format the text it prints into the page.
This is simple enough to do -- just surround the the
<script> ... </script> block with font tags, like this:
<font face="Arial" size="2" color="#FF0000">
<script>
.
.
.
</script>
</font>
Change the face, size, and color to match your design.
2.
You may not, of course, want to use the "Hello Name!"
message we show. See the two commented lines in the script
above for where you can change the message.
============================================================-Offline- |
gosh... this is so cute... let me try it..
reli cool.. 
ahmn.. but then i have to set my protected mode to medium
to see the script.. 
Last edited by cUtiEshika (2008-01-02 03:51:29)

good..
but i think you must include some credits for that script.




-Offline- |

-Offline- |
for live preview checkout my layouts collection site.
http://thegospelparagons.qc.tc/
Last edited by dynamicfriendsterwebmastr (2008-01-06 10:24:55)
-Offline- |

you site is not accessible...
-Offline- |
where should i attach the SCRIPT???
pls.... can u tell me?
-Offline- |

dynamicfriendsterwebmastr wrote:
Code:
============================================================ Script: Ask Visitor For Name Script Functions: A very simple paste-it-in script that asks the vistor for his or her name when entering your page, then prints a "Hello" welcome message anywhere you wish in the body of the page. If the visitor does not type in a message, a default message shows, instead. Very easy install for JavaScript newcomers. Browsers: NS3-6, IE4-6 Author: etLux ============================================================ INSTRUCTIONS: Paste the following <script> ... </script> block into the <body> (notice we said the body, *not* the <head>) of your page, exactly where you would like the message to appear. <script> // (C) 2001 www.CodeLifter.com // http://www.codelifter.com // Free for all users, but leave in this header var whatName=prompt("Please type in your name:",""); function doName(theName){ if ((whatName != "")&&(whatName !=null)){ // you can modify this as needed // this is the message if a name is typed in document.writeln("Hello "+whatName+"!. Welcome To EG Layouts. ") }else{ // you can modify this as needed // this is the message if a name is *not* typed in document.writeln("Hello!") } } doName(whatName); </script> ============================================================ Design Notes: 1. When you use an in-the-body script like this, you will usually want to format the text it prints into the page. This is simple enough to do -- just surround the the <script> ... </script> block with font tags, like this: <font face="Arial" size="2" color="#FF0000"> <script> . . . </script> </font> Change the face, size, and color to match your design. 2. You may not, of course, want to use the "Hello Name!" message we show. See the two commented lines in the script above for where you can change the message. ============================================================
your post is incomplete you didn't tell us its functions and where we will paste this you just only put the codes there without proper instructions now that will be called useless and lame 
Last edited by Shirow Masamune (2008-01-04 13:50:04)
sorry. but for me its working...
-Offline- |

Sir I know it works depending on how you apply the code but please be informed that posting codes requires previews or screen shots and instructions from the code submitter...
![]()

thats what im telling him to do at the previous post
oh well he is too ignorant for that lame tricks came from lame sharer 
Ephemeral Wrote:
Sir I know it works depending on how you apply the code but please be informed that posting codes requires previews or screen shots and instructions from the code submitter...
<script language="JavaScript">
var whatName=prompt("Please type in your name:","");
function doName(theName){
if ((whatName != "")&&(whatName !=null)){
// you can modify this as needed
// this is the message if a name is typed in
document.writeln("Hello "+whatName+"!. Welcome To my Page. ")
}else{
// you can modify this as needed
// this is the message if a name is *not* typed in
document.writeln("Hello!")
}
}
doName(whatName);
</script>-Offline- |
Ephreim wrote:
where should i attach the SCRIPT???
pls.... can u tell me?
<HTML>
<HEAD>
<script language="JavaScript">
var whatName=prompt("Please type in your name:","");
function doName(theName){
if ((whatName != "")&&(whatName !=null)){
// you can modify this as needed
// this is the message if a name is typed in
document.writeln("Hello "+whatName+"!. Welcome To my Page. ")
}else{
// you can modify this as needed
// this is the message if a name is *not* typed in
document.writeln("Hello!")
}
}
doName(whatName);
</script>
</HEAD>
<BODY></BODY>
</HTML>-Offline- |

i think u can add this in ur js files by using this code:
var whatName=prompt("Please type in your name:","");
function doName(theName){
if ((whatName != "")&&(whatName !=null)){
// you can modify this as needed
// this is the message if a name is typed in
document.writeln("Hello "+whatName+"!. Welcome To EG Layouts. ")
}else{
// you can modify this as needed
// this is the message if a name is *not* typed in
document.writeln("Hello!")
}
}
doName(whatName);
-Offline- |
can i ask you something? i dont know where to post this script to make it work.. can you help me? pls, kindly reply..thank very much..
<script>
// (C) 2001 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header
var whatName=prompt("Please type in your name:","");
function doName(bLeSsy){
if ((whatName != "")&&(whatName !=null)){
// you can modify this as needed
// this is the message if a name is typed in
document.writeln("Hello "+whatName+"!. Welcome To ASs KiCkEr layouts. ")
}else{
// you can modify this as needed
// this is the message if a name is *not* typed in
document.writeln("Hello!")
}
}
doName(whatName);
</script>
-Offline- |
-Offline- |
[b]garfield000021 wrote:
can i ask you something? i dont know where to post this script to make it work.. can you help me? pls, kindly reply..thank very much..[/b]
i just post this thread in the tech section. this is only a additional website trick. i dont use js on my
fs coz its not working...
but if u want to use it on ur website, just copy all the code and paste it.
-Offline- |
@garfield: refer to reply #14.. juz above ur post..
btw, wer do u wanna use it..?

its working in js but it only ask my name...after dat it doesnt greet me...

-Offline- |
johnc3na wrote:
its working in js but it only ask my name...after dat it doesnt greet me...
make sure to check ur script. mostly just a simple semicolon denotes the whole error of the script
make sure open parentheses { must be closed to } (close parentheses).
and check your codes....
try also these
change [b]document.writein() to alert() to make it 2 alerts on page enter.[/b]
Last edited by dynamicfriendsterwebmastr (2008-01-19 05:34:04)
-Offline- |