Skip to main content

Posts

Showing posts with the label JQuery Mobile

The connection to the server was unsuccessful - Mobile development

 When I was working with mobile development using PhoneGap with JQurey mobile, many time I got error like "The connection to the server was unsuccessful" as shown in the figure, when launching the  application using Android simulator. I had searched using google and I found the following solution. What I had done is, I updated the Java class (main activity class) with following code present in src folder. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setIntegerProperty("splashscreen", R.drawable.splash); //Needs to update the loadUrlTimeoutValue property super.setIntegerProperty("loadUrlTimeoutValue", 60000); super.loadUrl("file:///android_asset/www/index.html"); }  Here I have increased the  loadUrlTimeoutValue value as 60 seconds.

Multi-Page template in JQuery Mobile

 In my previous post I had talked about single page template in jQuery mobile. This is my another simple example for creating multiple page template using JQuery mobile. JQuery Mobile Multi Page Template Header This is page1 Move To Second Page Footer Header This is page2 Move To First Page Footer  Here the init() method is my onload function, In this function I have registered the on click event for two buttons. The button "moveToPage2" present in page1 is redirect you to second page and the button "moveToPage1" button present in second page is redirect you to first page. ...

Single page template in JQuery mobile

 The following code is simple example for creating mobile pages using JQuery mobile. For developing JQuery mobile pages you needs to include the jquerymobile.css, jquerymobile.js and jquery.js files. You can able to download these file from jquery site. This is my single page template. <! DOCTYPE html> < html > < head >        < meta charset = "ISO-8859-1" >        < meta name = "viewport" content = "width=device-width, initial-scale=1" >        < title > JQuery Mobile Single Page Template </ title >        < script type = "text/javascript" src = "js/jquery.js" ></ script >        < script type = "text/javascript" src = "js/jquery.mobile-1.1.0.min.js" ></ script >        < link rel = "stylesheet" type = ...