I placed a console.log in the onRequest, and the element is being drawn 
correctly.  Placing a console.log in the onComplete (also tested in 
onSuccess) didn't do anything.  The onSuccess runs a CFC that will update 
the database with the new value - that much is being done - but after the 
CFC is completed, the onSuccess/onComplete does not fire (checks to see 
that the data returned is JSON - it is - and processes from there.

Unfortunately, I work in a DoD environment, and both github and jsfiddle 
are BLOCKED.  Can't even get a glimpse of the site - "internet usage is 
blocked for this site".  :(

JD

On Thursday, January 9, 2014 4:04:11 PM UTC-6, johnnyf wrote:
>
> Ok. Try the following:
>
> 1. console.log() the contents of json. You'll want to do the same at a 
> couple of other spots in your example to validate that your conditions are 
> working as expected.
> 2. Create a JSfiddle with an example. This will force you to simplify some 
> items and will help everyone monitoring this list assist you.
> 3. You can console.log an element, e.g., $('tmc'). This is helpful to 
> make sure the DOM is drawn as you intend/expect.
>
> Hope this helps.
>
> On Thu, Jan 9, 2014 at 1:49 PM, Jack Drysdale Jr 
> <[email protected]<javascript:>
> > wrote:
>
>> Hi, johnnyf,
>>
>> Thanks for the quick reply.  I cleared the cache and tried what you 
>> suggested.  Unfortunately, no change.  It still isn't updating the text of 
>> any elements, still no alerts.
>>
>> This really has me perplexed.  Similar functions for other sections are 
>> working, just fine.  Just this one doesn't want to follow through.
>>
>> JD
>>
>>
>>
>> On Thursday, January 9, 2014 3:30:20 PM UTC-6, johnnyf wrote:
>>
>>> 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
>>> [email protected]
>>>  
>>>
>>> On Thu, Jan 9, 2014 at 1:28 PM, Jack Drysdale Jr 
>>> <[email protected]>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 [email protected].
>>>>
>>>> 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 [email protected] <javascript:>.
>> 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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to