javascript - readyState does not get past 1 -



javascript - readyState does not get past 1 -

trying set info xml through javascripts open() function. website not past readystate 1, below the javascript code

function additem() { var name = document.getelementbyid('iname').value; var cost = document.getelementbyid('iprice').value; var quantity = document.getelementbyid('iquantity').value; var description = document.getelementbyid('idescription').value; xhrobject.open("get", "listing.php", true); xhrobject.onreadystatechange = function() { if (xhrobject.readystate == 4 && xhrobject.status == 200) { document.getelementbyid('information').innerhtml = xhrobject.responsetext; xhrobject.send(null); } } }

i not know if error php, quite big post in if required.

javascript php ajax

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -