I need to call a method of controller named test() from a Javascript. Script code is given below:
function changeColor(id, color)
{
element = document.getElementById(id);
qnid = document.form1.pickupFrom.qnid;
//window.location = "<?= site_url('controller/test') ?>"
}
Is it possible? And how to pass the parameters?