/    Sign up×
Community /Pin to ProfileBookmark

Form validation

Hi
I am making registration form for my website,how can i write javascript validation code to display errors with out an alert box.
I want to display an error message next to the input field.

thank you so much in advance

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@JMRKERApr 16.2012 — Post a brief example of the form you are trying to validate.

Not the whole thing, just a brief HTML (with or without script) test program.
Copy linkTweet thisAlerts:
@chrisranjanaApr 16.2012 — http://docs.jquery.com/Plugins/Validation#demo

I understand using a framework just for form validation is overkill but if you are planning to do more things using javascript then I definitely recommend using a framework like jQuery
Copy linkTweet thisAlerts:
@aneesh29authorApr 16.2012 — HI

I have a form with name,password,email,country,age fields.
Copy linkTweet thisAlerts:
@WolfShadeApr 16.2012 — In a nutshell, place a div with a unique ID just next to the inputs and change the innterHTML of each to display the error message as it pertains to that field if that field isn't valid.
Copy linkTweet thisAlerts:
@JMRKERApr 16.2012 — HI

I have a form with name,password,email,country,age fields.[/QUOTE]


Don't make us do the easy part. Show some work. ?
×

Success!

Help @aneesh29 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...