Jquery Delay Function Calls

Posted by fizgig07 on Stack Overflow See other posts from Stack Overflow or by fizgig07
Published on 2010-03-08T22:19:47Z Indexed on 2010/03/08 22:21 UTC
Read the original article Hit count: 287

Filed under:
|
|

I'm trying to find a way to delay all code that takes place after I make a service call. The reason for this delay is that my service returns code necesarry for the following functions and the result I pass is to these following functions is undefined.

I have tried attaching the setTimeout() to the function that is called directly after the service call, but then it just skips the function I set the timeout on and jumps to the next function...My web method that I am calling is not that big and is not doing anything that is too intensive

public bool GetSpreadsheetStatusForAdmin(string cacId)
    {
        SpreadSheetStatus result = new SpreadSheetStatus();
        List<Data.Spreadsheet> spreadsheets = SpreadsheetManager.GetUserSpreadsheets(GetCurrent.Identity);
        if (spreadsheets.Count != 0)
        {
            foreach (Data.Spreadsheet spreadsheet in spreadsheets)
            {
                if (spreadsheet.Status == SpreadsheetStatus.Pending)
                {
                    return true;
                }
            }
        }
        return false;
    }

I had found the delay() and thought that might work, but I don't have jquery 1.4 and can't use it as of yet.

is there anything that can help..?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about c#