Posts Tagged "tips"

Some Tips In Optimizing Sencha Touch Chart Application

December 12th, 2012 by aditia rahman / No Comments  

     

Last month I got a project creating mobile application with charting features, since version 2.1 sencha touch provide integrated charting features for mobile application, so far I know sencha touch provide the most complete charting features for mobile application, it is the easiest because it already integrated with other components with the similar coding style, and sencha touch is my choice for this project.

sencha touch chart

Behind it simplicity it came with the implication in performance problem, especially for older android device, cause I have to display more than ten different chart, creating component for each chart display will make your app run slow.

JQuery Keypress And Detect Character Code

March 2nd, 2011 by aditia rahman / 1 Comment  

     

In this sort post I want to share how to detect keyboard input character using jquery, basically this is very simple cause JQuery have already built in keypress() event, we just need to get the callback parameter properties, let get through the code

$(document).ready(function() {
    $("#field").keypress(function(event) {
        alert(event.charCode);
    });
});

The code above used to get the character code from the input keyboard, you can browse more the “event” callback parameter using console.log() function and browse the entire parameter properties using firebug in firefox or inspect element console in webkit browser,

console.log(event);

and to convert back to character, simply using this javascript code.

String.fromCharCode(charCode);