retrieve data through ajax

In order to retrieve data via ajax, we give it some parameter data like requestId, andn telNum, then it will return a data through a data parameter. In our case, it is data.

JSON stringify

JSON.stringify turns an object in to a JSON text and stores that JSON text in a string.

鱼香肉丝 10 0.9 9 38 342 汉堡 15 0.9 13.5 46 621

Send html data via jQuery and AJAX to JSON url

You got whole bunch of data in textboxes and combo boxes. You retrieve those data by their id using jQuery like so:

Once you get these data…you pass it into ajax’s data parameter and you’re basically done:

single click on datagrid

This is how you detect single click on datagrids using easyui:

or

get text inside of a td, span, div…etc

If you want to click on a piece of html text inside a td, span, div, p…etc, you’d use jQuery’s on method:

performSelectorOnMainThread and detachNewThreadSelector

from MobileAppMastery/Threading/02 Basically detachNewThreadSelector detaches a thread and starts its work process. When you need to update the UI, you do it on the main thread. We use performSelectorOnMainThread to do it. We make our main thread perform a chunk of code. 1) get the big task going with:

2) the big task will […]

Simple detachThread example

From MobileMasteryApp/threading/01 long task that blocks UI In this example, we use the Activity Indicator to indicate the UI response. As you can see, when we start the loop to run through 40,000.

to make it start animating. However, on the emulator, you won’t see it moving because the current main thread will process […]