Do you mean that I should use the "imageNumber" index variable
in place of the loopCounter variable?
-----Original Message-----
From: Brian Thornton [mailto:
Brian@CFDe...]
Sent: Tuesday, May 01, 2012 2:07 PM
To: cf-talk
Subject: Re: Anyone see anything wrong with this code?
You are refrencing as 1 and need to refrence as the index.
On Tue, May 1, 2012 at 1:48 PM, Rick Faircloth <
Rick@whit...>
wrote:
>
> Looks like a good solution for getting some error clues
> back from AJAX calls. I'll have to work on translating
> this into jQuery. Usually, I can find some CF error code
> in the iFrame used to process the file uploads, but nothing
> is appearing there, or in the JSON reply.
>
> Thanks for the tip!
>
> Rick
>
> -----Original Message-----
> From: Claude Schnéegans <
schneegans@inte...>
> [mailto:=?ISO-8859-1?Q?Claude_Schn=E9egans <schneegans@interneti=71?=
> =?ISO-8859-1?Q?ue.com=3E?=]
> Sent: Tuesday, May 01, 2012 1:13 PM
> To: cf-talk
> Subject: Re: Anyone see anything wrong with this code?
>
>
> »>>I can't give any clues on error messages, because this
> is part of a cfc on the back end of an ajax call.
> No errors show up in firebug or elsewhere.
>
> This is a problem with Ajax calls.
> If the template called by Ajax throws an error, the text returned by the
CF
> server is not compatible with Ajax and it causes an Ajax error. This error
> will not help, what one is intersted in is the error in the CF error.
>
> I've developped my own Ajax call function, and in case of error, it will
> open a new window with the whole text returned in it. Generally, it is the
> error generated by CF.
> This one is for POST method, but I have the equivalent for GET:
> If there is anything wrong, the function calls displayError to displat the
> text actually received.
>
> function ajaxPOST (url, sendText)
> {
> var XMLHttp = null;
> if (window.XMLHttpRequest)XMLHttp = new XMLHttpRequest();
> // code for MSIE
> else if (window.ActiveXObject)XMLHttp = new
> ActiveXObject("Microsoft.XMLHttp");
> if(XMLHttp)
> {
> XMLHttp.open("POST", url, false);
> XMLHttp.setRequestHeader("Content-Type",
> "application/x-www-form-urlencoded; charset=iso-8859-1");
> XMLHttp.send(sendText);
> if (XMLHttp.status == 200)return XMLHttp.responseText;
> displayError("<H2>" + XMLHttp.statusText + "</H2><P>" +
> XMLHttp.responseText)
> return null;
> }
> else return null;
> }
> function displayError(text)
> {
> var errorWin = open
> ("","Error","scrollbars=yes,resizable,width=900,height=600");
> errorWin.document.open();
> errorWin.document.write(text);
> errorWin.document.close();
> errorWin.focus()
> }
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350928
Subscription:
http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
opensubscriber is not affiliated with the authors of this message nor responsible for its content.