|
|
Hello everyone.
I am trying to get cfform format="flash" with ajax to work. I have set an
onsubmit action on one of the buttons to update comments field in my DB. I
wrote the cfc, and <cfformitem type="script"> ... </cfformitem> based on the
realestate example in CF Dev. Center. Now when I click on the button I get the
"clock" cursor and that is it, I checked my DB but the update wasn't made and
there are no error reported by onStatus function either. I am a complete new
bee at this, and can't figure out what is going on please help.
using: CF8, on mac os x, please see the attached code.
Thank you
Jay
P.S: If I use the code exactly the way they do in the tutorial
(realestate.zip) using global var, and setup my connection when form loads.
Then I get an error "The 2 parameters of the Left function which is now 0 must
be positive integer" hence I create the connection locally in
updateSeqComment() function.
function updateSeqInfo():Void{
var seqInfoArgs = {};
seqInfoArgs.comment = seqComment.text;
seqInfoArgs.id = #sequenceId#;
mx.managers.CursorManager.setBusyCursor();
var connection:mx.remoting.Connection =
mx.remoting.NetServices.createGatewayConnection("http://localhost/flashservices/
gateway/");
var componentPath =
"#application.rootComponent#.listingServices";
var myService:mx.remoting.NetServiceProxy;
var responseHandler:Object = {};
responseHandler.onResult = function( results:
Object ):Void {
alert("DONE");
mx.managers.CursorManager.removeBusyCursor();
}
responseHandler.onStatus = function( stat:
Object ):Void {
//if there is any error, show an alert
alert("Error: " + stat.description);
mx.managers.CursorManager.removeBusyCursor();
}
myService =
connection.getService("evmCF2.listingServices", responseHandler);
}
|
|