• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Calling CFC Method With AJAX

Guest
Jun 05, 2006 Jun 05, 2006

Copy link to clipboard

Copied

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
TOPICS
Advanced techniques

Views

518

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 05, 2006 Jun 05, 2006

Copy link to clipboard

Copied

> 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.
>

Wanna elaborate on "not working" and "trouble"?

--
Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 05, 2006 Jun 05, 2006

Copy link to clipboard

Copied

Well more specificlly its "Not Working" .

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 05, 2006 Jun 05, 2006

Copy link to clipboard

Copied

My Friend may I ask you which Ajax lib. you are using first?

Thank you
Al

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 06, 2006 Jun 06, 2006

Copy link to clipboard

Copied

LATEST
This might be a stupid question, but do you have the method's access set to
remote? You are calling it via HTTP.

--
Bryan Ashcraft (remove brain to reply)
Web Application Developer
Wright Medical Technologies, Inc.
=============================
Macromedia Certified Dreamweaver Developer
Adobe Community Expert (DW) :: http://www.adobe.com/communities/experts/


"flooker" <yousafriaz@hotmail.com> wrote in message
news:e61jtu$o22$1@forums.macromedia.com...
> 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.
>
> 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
>


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation