/    Sign up×
Community /Pin to ProfileBookmark

Form validation error on lost focus

Hi all

I have a html form in a php file..
I want to display the validation message below the text field if a user doesn’t enter valid data in the field..

Example:
If a user doesn’t enter a valid email it gives a validation message “Invalid email” on the email text box lost focus means when the cursor reaches the next field…

Hope u all got me…

Can anyone help me??

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@stuopaOct 28.2007 — To achieve this, for when a user removes focus from one field to another, you would need to use the javascript onblur event.
Copy linkTweet thisAlerts:
@jack001authorOct 28.2007 — To achieve this, for when a user removes focus from one field to another, you would need to use the javascript onblur event.[/QUOTE]

can you please provide me some example???

please

10q in advance

regards

Jack
×

Success!

Help @jack001 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 5.4,
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,
)...