How to check email address not registered before without reloading the page


I want my web app to have a registration page where user can sign up and they should be notified right away(without reloading the page) if the email address they have entered in already used. some sort of code snippet would be helpful.


I accomplish this by using a meteor method. When the user clicks the sign up, or on some ~throttled keyup event, you call a method with the arguments such as username, email, etc. In your server side function, you can try to find a user with the current email, and if you do, you can throw an error which can be caught on the client, and then you can render an error message on the screen with the details of the caught error.

I think if you try to sign the user up, an error will be thrown if the email is already being used? If not, just try the findOne mentioned above.