[CLOSED] Error if AjaxMetod returns ""

  1. #1

    [CLOSED] Error if AjaxMetod returns ""

    Hi I got an error in this javascript if the ajaxmetod returns "". Really annoying. A bug, or is it my misstake?

    
    
        [AjaxMethod]
        public string GetUserWithNewMessage()
        {
            return "";
        }
    
        function updateUserStatus()
        {    
            Coolite.AjaxMethods.GetUserWithNewMessage({success: onUpdateUserSuccess});        
        }
        
        function onUpdateUserSuccess(result)
        {
            try
            {           
                if (result != "") <-- ERROR if AjaxMetod returns ""
                  alert(result); 
            
            }
            catch(e)
            {
                Ext.Msg.alert('Error',e.message);
            }
            
        }
    /Mikael
  2. #2

    RE: [CLOSED] Error if AjaxMetod returns ""

    Hi Mikalel,

    What error do you have?


    I found only one bug if method return an empty string.
    It is need to handle as result.result
    Now it is fixed. Please update from SVN


  3. #3

    RE: [CLOSED] Error if AjaxMetod returns ""

    yes that is the error I got.
    Thanks!

    /Mikael

Similar Threads

  1. [CLOSED] e.getkey() returns undefined?
    By JonG in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 10, 2010, 11:29 AM
  2. Date field returns nothing
    By Nime in forum 1.x Help
    Replies: 1
    Last Post: Nov 10, 2009, 8:35 AM
  3. [CLOSED] #{AjaxMethods} returns null
    By Steve in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 14, 2009, 7:22 AM
  4. [CLOSED] datefield always returns min value
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 30, 2009, 8:22 AM
  5. [CLOSED] dateRenderer returns NaN-NaN-NaN
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 01, 2008, 8:31 AM

Posting Permissions