I have a Join page on my site(which also has a login form).

Is it easy to write java-script to determining if they do not have matching passwords(re-type password for Join form) or a valid email without redirecting you from the page? That way if something is wrong it shows a red star or something asking them to retype the password or enter a valid email address.

Is that something hard to write in java? Then if the information is valid it uses php to create or login the user and redirects them to the home page.

Recommended Answers

All 4 Replies

You do that with JavaScript. What you do is retreiving the values from the both password fields and compare them to each other, if they do match you change the "not the same image" to the "the same image". The best way would probably be that the script is called every time the user have pressed a key on the keyboard with the "onkeyup" attribute on the password form element :)

This is how I would do it but you can probably just find a plugin that can do it for you.

If your problem has been solved, please also mark the thread as solved :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.