-1

I have a very simple registration screen with the following field:

        <input id="Email"
               name="Email"
               placeholder="Email"
               required="required "
               type="text"
               value="" />

        <button id="register"
                type="button"
                onclick="location.href='/Account/Register'">
            Register
        </button>

My registration screen does not have jQuery available.

How can I make it so that after the user leaves the screen or after he clicks the submit button then an ajax call is made to check if the user email is already in the system.

Samantha J T Star
  • 30,952
  • 84
  • 245
  • 427
  • Use an `XMLHttpRequest` object. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest – Barmar Apr 22 '14 at 09:29

1 Answers1

1

You can submit a form using AJAX but no jQuery. This involves using Javascripts default Ajax API, XMLHttpRequest. See: Simple ajax form using javascript no jQuery for more info.

Community
  • 1
  • 1
Bob Brinks
  • 1,372
  • 1
  • 10
  • 19