Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed javascript to ask for callbacks rather than elements

  • Loading branch information...
commit 39d238d9f48712d722ff187bce03b617c6d757af 1 parent 7361b55
@grandecomplex grandecomplex authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 Android/ContactView/ContactView.js
View
7 Android/ContactView/ContactView.js
@@ -1,14 +1,13 @@
var ContactView = function() {};
-ContactView.prototype.show = function(nameElement, phoneElement) {
+ContactView.prototype.show = function(successCallback, failCallback) {
function success(args) {
- nameElement.value = typeof args.name != "undefined" ? args.name : "";
- phoneElement.value = typeof args.phone != "undefined" ? args.phone : "";
+ successCallback(args);
}
function fail(args) {
- alert("fail "+args)
+ failCallback(args);
}
return PhoneGap.exec(function(args) {
Please sign in to comment.
Something went wrong with that request. Please try again.