I think you'll get what you expect if you change 'onComplete' to 'onSuccess'.
Johnny Fuery President/Principal Engineer Fuery Solutions -- makers of MerusCase 1736 Franklin Street, Suite 350 Oakland, CA 94612 510.550.5000 Main 925.997.3878 Mobile 510-836-0915 Fax j...@fuery.com On Thu, Jan 9, 2014 at 1:28 PM, Jack Drysdale Jr <jack.drysdale...@gmail.com > wrote: > Hello, everyone. > > I've got a function that is called whenever specific input field values > are changed. The onRequest is firing, no problem. But the onComplete does > not do anything. At all. I've placed alerts, they don't fire. I used > try/catch, nothing. > > > var vtr = new Request.JSON({ >> url: root + '/abc/def/ghi/component.cfc?method=tmcu&id=' + ID, >> onRequest: function(){// works fine.. >> $('tmc').set('text','Calculating...'); >> }, >> onComplete: function(json, text){ >> json = JSON.decode(json); >> if(json == null){ >> json = JSON.decode(text); >> } >> if (typeOf(json) != 'object' || typeOf(json.tmc) == 'null') { >> // ...check to see what kind of error was returned. >> jsonDataSessionCheck(json); >> }else { >> if([11,40].contains(json.bc.toInt()) && ! >> [11,40].contains($('bc').get('text').trim().toInt())){ >> myParent().$('ocr').fakeEditClick(); >> }else if (! [11,40].contains(json.bc.toInt()) && >> [11,40].contains($('bc').get('text').trim().toInt())){ >> myParent().$('ocr').fakeEditClick(); >> }else{ >> $('tmc').set('text',json.tmc); // THIS IS SUPPOSED TO >> CHANGE THE TEXT OF AN ELEMENT. IT'S NOT. >> $('bc').set('text',json.bc); // THIS IS SUPPOSED >> TO CHANGE THE TEXT OF AN ELEMENT. IT'S NOT. } >> } >> } >> }) >> > > For the life of me, I cannot understand why the onComplete is not firing. > Can anyone think of anything that would prevent onComplete from firing? > > Thanks, > > JD > > -- > > --- > You received this message because you are subscribed to the Google Groups > "MooTools Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to mootools-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- --- You received this message because you are subscribed to the Google Groups "MooTools Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to mootools-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.