friendsterTalk - Friendster Forum

friendsterTalk - Friendster Forum

Welcome guest! Please Login or Register.

#1  2008-01-02 02:04:45

dynamicfriendsterwebmastr
» FriendsterTalker
Registered: 2007-11-16
Posts: 245
Last visit: 2008-09-09
Reputation: 2

Ask A Visitors Name Script

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.

============================================================

#2  2008-01-02 03:40:02

cUtiEshika
» FriendsterGeek
cUtiEshika's display avatar
xhet... no PM plz....
Location: Konoha
Registered: 2007-07-24
Posts: 1457
Reputation: 77
Friendster

Re: Ask A Visitors Name Script

gosh... this is so cute... let me try it..
reli cool..  :wow:
ahmn.. but then i have to set my protected mode to medium
to see the script.. :cry:

Last edited by cUtiEshika (2008-01-02 03:51:29)



CLASS U: Unbelonged

Lavender-Bliss
. . . where tears and laughter entwined



#3  2008-01-02 06:48:52

slashedkite
» FriendsterGeek
slashedkite's display avatar
Former LS member..
Friendstertalk University
Location: onloadhandler
Registered: 2007-01-23
Posts: 1077
Last visit: 2008-11-29
Reputation: 15
Friendster

Re: Ask A Visitors Name Script

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



:ninja::ninja:

#4  2008-01-02 08:02:23

dale
» Moderator
dale's display avatar
Clique Mee
Location: G.Lagro.subd.
Registered: 2007-05-24
Posts: 7196
Last visit: 2008-11-29
Reputation: 67
Friendster

Re: Ask A Visitors Name Script

and live preview.. :thumbsup:


#5  2008-01-02 08:49:37

dynamicfriendsterwebmastr
» FriendsterTalker
Registered: 2007-11-16
Posts: 245
Last visit: 2008-09-09
Reputation: 2

Re: Ask A Visitors Name Script

for live preview checkout my layouts collection site.

http://thegospelparagons.qc.tc/

Last edited by dynamicfriendsterwebmastr (2008-01-06 10:24:55)

#6  2008-01-02 08:55:27

Lordheinz
» Banned
^ trashed
Registered: 2007-06-26
Posts: 5178
Last visit: 2008-09-11
Reputation: 242

Re: Ask A Visitors Name Script

you site is not accessible...


Thank you so much FRIENDSTERTALK...

#7  2008-01-04 13:23:55

efreim
» FriendsterNewbie
Registered: 2008-01-04
Posts: 4
Last visit: 2008-08-16
Reputation: ~

Re: Ask A Visitors Name Script

where should i attach the SCRIPT???
pls.... can u tell me?

#8  2008-01-04 13:49:07

Shirow Masamune
» Moderator
Shirow Masamune's display avatar
Loop
Class-S
Location: Castle Belphegor
Registered: 2007-07-26
Posts: 4416
Reputation: 204
Friendster

Re: Ask A Visitors Name Script

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  :puke:

Last edited by Shirow Masamune (2008-01-04 13:50:04)




With your wings... We will fly together...

#9  2008-01-04 16:00:55

dynamicfriendsterwebmastr
» FriendsterTalker
Registered: 2007-11-16
Posts: 245
Last visit: 2008-09-09
Reputation: 2

Re: Ask A Visitors Name Script

sorry. but for me its working...

#10  2008-01-04 16:06:06

Ephemeral
» Moderator
Ephemeral's display avatar
L'Interdit
Class-S
Location: Perdido Paraíso
Registered: 2006-10-20
Posts: 10253
Reputation: 281
Friendster

Re: Ask A Visitors Name Script

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...  :)  :thumbsup:


#11  2008-01-05 03:20:35

Shirow Masamune
» Moderator
Shirow Masamune's display avatar
Loop
Class-S
Location: Castle Belphegor
Registered: 2007-07-26
Posts: 4416
Reputation: 204
Friendster

Re: Ask A Visitors Name Script

thats what im telling him to do at the previous post  :lol: 
oh well he is too ignorant for that lame tricks came from lame sharer :wasted:




With your wings... We will fly together...

#12  2008-01-06 10:17:47

dynamicfriendsterwebmastr
» FriendsterTalker
Registered: 2007-11-16
Posts: 245
Last visit: 2008-09-09
Reputation: 2

Re: Ask A Visitors Name Script

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...



:ninja:

ok sir, here's the right code...


Code:

<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>



for the preview, just..

- follow this link... http://thegospelparagons.qc.tc/
or...


- try pasting codebox content in the notepad then save as filename.htm.

i apologize if this code is not working ur computer. maybe it's the browser. coz, i use firefox..
hope this code is corrected already in this post.

sir ephemeral,

hope i help thee with this correction

#13  2008-01-06 10:23:26

dynamicfriendsterwebmastr
» FriendsterTalker
Registered: 2007-11-16
Posts: 245
Last visit: 2008-09-09
Reputation: 2

Re: Ask A Visitors Name Script

Ephreim wrote:
where should i attach the SCRIPT???
pls.... can u tell me?



paste this code before the body section of the html document/webpage.

ex:

Code:

<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>

#14  2008-01-07 06:46:45

j0hnc3na
» FriendsterAddict
j0hnc3na's display avatar
U Cant See Me!!!
Location: The Squared Circle
Registered: 2007-09-29
Posts: 377
Last visit: Yesterday
Reputation: 3
Friendster

Re: Ask A Visitors Name Script

i think u can add this in ur js files by using this code:

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);



Read the rules or be WARNED...
much worst , be
BANNED...

#15  2008-01-08 05:47:46

garfield000021
» FriendsterNewbie
Registered: 2008-01-07
Posts: 1
Last visit: 2008-01-08
Reputation: ~

Re: Ask A Visitors Name Script

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>

#16  2008-01-08 16:01:19

Ellakoi
» FriendsterTalker
Ellakoi's display avatar
Do you feel better now?:D
Laymakers Society
Location: 643-KSW
Registered: 2007-09-26
Posts: 247
Last visit: 2008-11-12
Reputation: 1

Re: Ask A Visitors Name Script

Wow~
Nice scripts.



#17  2008-01-09 14:14:11

dynamicfriendsterwebmastr
» FriendsterTalker
Registered: 2007-11-16
Posts: 245
Last visit: 2008-09-09
Reputation: 2

Re: Ask A Visitors Name Script

[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.

#18  2008-01-09 16:30:08

cUtiEshika
» FriendsterGeek
cUtiEshika's display avatar
xhet... no PM plz....
Location: Konoha
Registered: 2007-07-24
Posts: 1457
Reputation: 77
Friendster

Re: Ask A Visitors Name Script

@garfield: refer to reply #14.. juz above ur post..
btw, wer do u wanna use it..?



CLASS U: Unbelonged

Lavender-Bliss
. . . where tears and laughter entwined



#19  2008-01-10 06:17:44

j0hnc3na
» FriendsterAddict
j0hnc3na's display avatar
U Cant See Me!!!
Location: The Squared Circle
Registered: 2007-09-29
Posts: 377
Last visit: Yesterday
Reputation: 3
Friendster

Re: Ask A Visitors Name Script

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




Read the rules or be WARNED...
much worst , be
BANNED...

#20  2008-01-19 05:29:33

dynamicfriendsterwebmastr
» FriendsterTalker
Registered: 2007-11-16
Posts: 245
Last visit: 2008-09-09
Reputation: 2

Re: Ask A Visitors Name Script

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)

Search Friendstertalk

Board footer

FriendsterTalk is not affiliated with Friendster.com
Copyright © 2002–2008 PunBB

[ 28 queries - 0.699 second ]

Pay Per Click Ads by pay per click advertising by Kontera

FriendsterTalk.com x

Welcome to FriendsterTalk! You'll need to login in order to fully use all the features and view all the sections of this site.

Please register if you're not yet a member. =)