Add method to load url from javascript besides using
document.location.href. Use application.loadURL("Your URL here...").
This is to test the network availability check.