Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - ClientSide Validation
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ClientSide Validation

 Post Reply Post Reply
Author
gangla View Drop Down
Newbie
Newbie


Joined: 28 May 2008
Location: Kenya
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote gangla Quote  Post ReplyReply Direct Link To This Post Topic: ClientSide Validation
    Posted: 06 June 2008 at 1:56pm
In my application,i want to validate data after user input,if a textbox is meant for an integer value,then it should not allow characters,displaying error message if this is violated,if it is for meant for text,it should only allow text and not integers or other characters..Please assist
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 06 June 2008 at 2:22pm
your best option (and probably only option) is to use JavaScripts.

Have alook on JavaScriptKit.com, they may have what your looking for.
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
Videoediting View Drop Down
Newbie
Newbie
Avatar

Joined: 30 July 2008
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Videoediting Quote  Post ReplyReply Direct Link To This Post Posted: 07 August 2008 at 1:20pm
 function OnlyNames(str)
{
return /^ *[A-Za-z'\s']+ *$/.test(str);
}

if(!OnlyNames(document.getElementById("txtbox").value) )
      {
      flag=true;
       document.getElementById("lbl").innerHTML="Invalid Name";
      }

Cheers,

SPBig%20smile
http://www.videoediting-direct.co.uk
Back to Top
vikas View Drop Down
Newbie
Newbie
Avatar

Joined: 23 January 2009
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote vikas Quote  Post ReplyReply Direct Link To This Post Posted: 23 January 2009 at 1:14pm
Try these steps hope it ll helpful for you..

  1. Enter in invalid text and submit. Reset form.
  2. Enter in valid text and submit. Reset form.
  3. Turn on debug and repeat step 1 and 2.
  4. Turn off debug and turn on override. Enter errors and submit. Submit again. Reset form.
  5. Turn off override. Turn off message box. Enter errors and submit. Reset form.
  6. Turn on show errors in form element. Enter errors and submit. Reset form.
  7. Change icon and turn on message box. Enter errors and submit. Reset form.

Back to Top
scottage View Drop Down
Newbie
Newbie


Joined: 20 August 2004
Location: United Kingdom
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote scottage Quote  Post ReplyReply Direct Link To This Post Posted: 15 June 2009 at 1:15pm
DO NOT rely on Javascript to valid your use input; what happen if I turn off javascript then submit your form? Add validation controls (there are a few; RequiredField, RegularExpress, Compare, etc.) to your form and let them do the work :-)
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.