Permalink
Browse files

Adding ErasePref method provided by Andy Edmonds

  • Loading branch information...
1 parent 2170cf4 commit 3d57014c77e14ca0d63a655fa9ebdffa3090fed2 @jeffmcfadden committed Mar 13, 2009
Showing with 10 additions and 0 deletions.
  1. +10 −0 magic_prefs.js
View
@@ -101,6 +101,16 @@ MagicPrefs.prototype.GetPref = function( name ){
}
}
+//Provided by Andy Edmonds - thanks Andy!
+MagicPrefs.prototype.ErasePref = function(id){
+ //LogIt( 'EraseData' );
+ this.db.transaction(
+ function( tx ){
+ tx.executeSql( "DELETE FROM SaveData WHERE name= '" + id + "'" );
+ }
+ );
+}
+
MagicPrefs.prototype.SaveData = function(){
function makeClosure(i, data) {
return function( tx ){

0 comments on commit 3d57014

Please sign in to comment.