Javascript Visitor’s Name Code?

expired domain names
Cyber Renegade asked:


Hello,
I want to include a code on my site, this script will display the visitor’s name but they would have to enter it before entering the site, and then a cooky would be put there, welcoming them back.
My issue is that if the person press escape it will say “Hello null!” I want to change it to “Hello Visitor if they decide to ignore the message box.
Please view the below code, tidy and fix it if you can, if anyone know a better code please share.

Thanks.








One Response to 'Javascript Visitor’s Name Code?'

  1. Gitlez - December 26th, 2011 at 12:16 pm

    Change line 37 from:

    return null

    To:

    return ‘Visitor’

    That should do it.

    Good Luck.

    Cheers,
    Gitlez

    [SIDENOTE] I haven’t seen a GeoCities link in at least a decade. Made me smile :)


Leave a Reply