I'm trying to retrieve a value from the mysql db to be posted to a textbox on the admin panel.
I have everything working and connecting and returning the correct values. When I step through the debugger, I see the values being assigned to the correct variables etc.
Problem I'm experiencing however, is that the values I retrieve, seem to disappear from the textbox after the function has finished processing.
phtml code:
function valChecker()
{
var val = document.getElementById("test_attrib").value;
var url = '<? echo Mage::helper('adminhtml')->getUrl('machines/index/death'); ?>';
var response = "";
new Ajax.Request(url, {
parameters:{test_attrib:val},
onSuccess: function(transport){
response = transport.responseText;
document.getElementById("test_attrib").value = response;
},
onFailure: function(failer){
}
});
}
if anyone would be so kind to assist please?
retval
? – Jayesh Patel Apr 5 '16 at 10:02