Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Require Real Name to be Entered
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Require Real Name to be Entered

 Post Reply Post Reply
Author
crhoa View Drop Down
Newbie
Newbie


Joined: 24 May 2005
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote crhoa Quote  Post ReplyReply Direct Link To This Post Topic: Require Real Name to be Entered
    Posted: 24 May 2005 at 4:58pm
First WWF looks great!
 
I'm trying to enforce that a real name is entered when registering.
 
In the language_file_inc.asp I have added:
 
   Const strTxtErrorRealName = "Real Name \t- You must enter your name to register"
 
And in the Java Script in register.asp (above Check for security code) I have entered.
 
   'If this is new reg then make sure the user enters there name
   If strMode ="new" Then
    %>
    //Check for a name
           if (document.frmRegister.realName.value <=10){
                   errorMsg += "\n\t<% = strTxtErrorRealName %>";
           }<%
   End If
 
However, when I publish the register.asp and try to register I get a blank page.
 
Is there something I have not done?
 
Thanks
Back to Top
crhoa View Drop Down
Newbie
Newbie


Joined: 24 May 2005
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote crhoa Quote  Post ReplyReply Direct Link To This Post Posted: 24 May 2005 at 7:53pm
OK realized what I did wrong......corrected code is
 
<%
'If this is new reg then make sure the user eneters a real name
If strMode ="new" Then
 %>
        //Check for a real name
        if (document.frmRegister.realName.value == ""){
                &nbs p;     errorMsg += "\n\tYou must enter your real name.";
        }
<%    
End If
 %>
Back to Top
crhoa View Drop Down
Newbie
Newbie


Joined: 24 May 2005
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote crhoa Quote  Post ReplyReply Direct Link To This Post Posted: 24 May 2005 at 8:29pm
Found the error of my ways.
 
Correct code is:
 

<%

'If this is new reg then make sure the user eneters a real name

If strMode ="new" Then

%>

//Check for a real name

if (document.frmRegister.realName.value == ""){

errorMsg += "\n\tYou must enter your name";

}

<%

End If

%>

Back to Top
kbannon View Drop Down
Groupie
Groupie


Joined: 03 October 2002
Location: Ireland
Status: Offline
Points: 115
Post Options Post Options   Thanks (0) Thanks(0)   Quote kbannon Quote  Post ReplyReply Direct Link To This Post Posted: 25 May 2005 at 6:47am
Just for reference, you can't force an open forum membership to submit their real name - you can just force them to enter something which, for example, could be 'get lost!'
I don't suffer from insanity, I enjoy every minute of it.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.