5/18/2019 4:20:32 PM
Kochu Virad Manesh6 Answers
New AnswerDo you have any errors in your browser's console during the execution of this code? I think this may be because of the CORS policy, which blocks the file protocol. It is better to use HTTP or HTTPS protocol for requests. Here's a lesson for you: https://www.w3schools.com/xml/dom_httprequest.asp
function ajax_func() { xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechance = function() { if(xmlhttp.readyState == 4 && xmlhttp.status == 200){ document.getElementByld('get_processed_data').innerHTML = xmlhttp.responseText; } } xmlhttp.open('GET', 'buy_process.php', true ); xmlhttp.send(); }
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message