Created
July 7, 2012 04:38
-
-
Save dhavaln/3064728 to your computer and use it in GitHub Desktop.
Simple Database Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<title>Insert title here</title> | |
</head> | |
<script type="text/javascript" src="lib/android/cordova-1.7.0.js"></script> | |
<script type="text/javascript"> | |
var dbCreated = false; | |
document.addEventListener("deviceready", | |
function() { | |
alert('1'); | |
db = window.openDatabase("testproject", "1.0", "PhoneGap Test", | |
200000); | |
alert('2'); | |
if (dbCreated) { | |
alert('3'); | |
db.transaction(getData, transaction_error); | |
} else { | |
alert('4'); | |
db.transaction(populateDB, transaction_error, | |
populateDB_success); | |
} | |
}, false); | |
function getData() { | |
} | |
function transaction_error() { | |
} | |
function populateDB(tx) { | |
} | |
function populateDB_success() { | |
} | |
</script> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment