getButterfly Logo

AJAX Request Using Vanilla JavaScript

  1. Home
  2. Blog
  3. AJAX Request Using Vanilla JavaScript

This is how you create an AJAX request with optional GET parameters in vanilla JavaScript. Note that you need to be on the same domain for the AJAX call to work.


function recordAb(parameters) {
    var xhttp = new XMLHttpRequest();'GET', '', true);



Find more JavaScript tutorials, code snippets and samples here.

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe to our mailing list