Question
Calling CFC Method With AJAX
Hello Guys , I am trying to call Component method using AJAX
but its not working , Here is the Code i am using . In Code
REC.OPEN is giving Trouble. Is this a Proper way to call Function ?
function Process_Calendar(day,month,year,name){
var hello = document.getElementById(name);
hello.innerHTML = day+'<img src="../../Content/Graphics/images.jpg">';
if (window.XMLHttpRequest)
{
req = new XMLHttpRequest();
}
else if (window.ActiveXObject){
req = new ActiveXObject("Microsoft.XMLHTTP");
}
req.open("getNoCache","BaseFunc.cfc?Method=Insertme&month="+month+"&day="+day+"&year="+year+"&ms="+new Date().getTime(),true);
req.send("");
if ((req.readyState == 4) && (req.status == 200)){
var arr = req.responseText;
hello.innerHTML = arr;
}
}
Thanks a Lot
function Process_Calendar(day,month,year,name){
var hello = document.getElementById(name);
hello.innerHTML = day+'<img src="../../Content/Graphics/images.jpg">';
if (window.XMLHttpRequest)
{
req = new XMLHttpRequest();
}
else if (window.ActiveXObject){
req = new ActiveXObject("Microsoft.XMLHTTP");
}
req.open("getNoCache","BaseFunc.cfc?Method=Insertme&month="+month+"&day="+day+"&year="+year+"&ms="+new Date().getTime(),true);
req.send("");
if ((req.readyState == 4) && (req.status == 200)){
var arr = req.responseText;
hello.innerHTML = arr;
}
}
Thanks a Lot