Cross-site HTTP requests

Cross-site HTTP requests are HTTP requests at URL addresses other than the domain of the resource making the request. The CORS specification allows the server side (that returns the resource we try to retrieve using the XHR object) to serve the resource to requests coming from resources that were served from other domains. According to the CORS specification the server side […]

The JSONP Technique

When using the XHR object in order to send an HTTP request to specific URL address we are limited. We cannot initiate this HTTP request to servers other than the one from which the web page (in which the code in JavaScript that uses the XHR object is running) arrived. The JSONP technique allows us […]

MooTools Request Class PRO

The MooTools JavaScript library provides us with the Request class. This class wraps the XmlHttpRequest object and allows us implementing ajax in a much simpler way. The following code sample shows how simple it is to use the MooTools Request class. It includes two files. The first file is the HTML file that includes code […]

String.js Jump Start PRO

String.js is a lightweight open source JavaScript library that provides us with useful functions for working with strings. You can easily download the String.js library code browsing in GitHub at https://github.com/jprichardson/string.js. The string.js library adds the S property to the window global object. The following code sample shows how simple it is to use this […]

HTML5. The Open Web Platform. PRO

What is HTML5? When browsing at http://www.w3.org/html/wiki/FAQs you will find the following definition for HTML5: ” People use the term HTML5 in two ways: 1. to refer to a set of technologies that together form the future Open Web Platform. These technologies include HTML5 specification, CSS3, SVG, MathML, Geolocation, XmlHttpRequest, Context 2D, Web Fonts (WOFF) […]

The Android Search Framework PRO

The android platform provides us with a search framework that helps us implementing search mechanism in our application. We can allow the user to enter the searched term either through a search dialogue shown on top of the screen or through a search view widget. When developing an application that includes a searching mechanism we […]

Developing Android Broadcast Receiver PRO

In order to develop an android broadcast receiver we should define a class that extends BroadcastReceiver, implement our onReceive method and update the android platform about the new broadcast receiver, either via the manifest xml file or by calling the registerReceiver method. The following code sample includes the definition of a BroadcastReceiver that will get […]

Android Resources Names PRO

Each resource has an ID number held in a static variable that belongs to one of the static inner classes in R. The name of that static variable is the very same name we specify as the name of the resource. It can be name of the string (string resource), the name of the image […]

Pausing & Resuming Java Script Execution in Web View PRO

When executing code written in Java Script in our web view we would like to pause it when the user moves to another activity and resumes it when he returns. The following code sample includes two activities. The first activity includes a web view that executes code written in Java Script. The second activity is […]

Android Display Orientation PRO

When developing for the android platform we can create two versions for the same layout xml document and keep them separately within ‘layout’ and ‘layout-land’ folders. When the android platform executes our application it will automatically use the correct version in according with the display orientation. The following video clip shows that.

Skip to content Update cookies preferences