Hi guys,
I have a link with structure which look like this:
<a href="index.php?<?php echo http_build_query(['x' => [$a,$b]]); ?>">Get Data</a>
I want to do ajax request which would look something like this:
var xhr = new XMLHttpRequest();
xhr.open('GET', 'index.php?' + [x =>[var_a,var_b]], true);
xhr.send();
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
var msg = JSON.parse(xhr.responseText);
}
}
Is it possible to get this done.
Thank you,