I am getting error - TypeError: updateAPI is not a functionn I am not sure why this is happening
the code for the function is as below
var APIS = '<?=preg_replace("/'/", "\'", json_encode($apis))?>';
var APISP = $.parseJSON(APIS);
var changedTo = 'left';
var updateAPI = function(id)
{
/* Function Statements */
};
The code through which I am calling this function is
window.setInterval(function() {
var ele = document.getElementById('itemSelector');
updateAPI((ele.options[ele.selectedIndex].id).replace(/[_\D]+/, ''));
}, 100);
Can anybody help? Thanks in advance.