>>Are you talking about using non-cf8 built-in ajax tags or ajax
functions that you built on your own using popular js libraries?
First I usually develop my own Javascript code with ONLY the features I
need, and try to avoid "popular" libraries,
secondly I do not need custom tags to use Javascript, but sometimes my
custom tags need some Javascript, which is different.
>>care to show us some of your nifty code for this?
Well for instancem here are two functions, one for GET requests, the
othe for POST:
function ajaxGET (url)
{
var XMLHttp = null;
if (window.XMLHttpRequest)XMLHttp = new XMLHttpRequest();
// code for IE
else if (window.ActiveXObject)XMLHttp = new
ActiveXObject("Microsoft.XMLHttp");
if(XMLHttp)
{
XMLHttp.open("GET", url, false);
XMLHttp.send(null);
if (XMLHttp.status == 200)return XMLHttp.responseText;
displayError(XMLHttp.statusText)
return null;
}
else return null;
}
function ajaxPOST (url, sendText)
{
var XMLHttp = null;
if (window.XMLHttpRequest)XMLHttp = new XMLHttpRequest();
// code for IE
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()
}
I also never use XML to transmit Javascript values, just return
javascrip code and evaluate it.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323801
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4