vendredi 2 janvier 2015

Download pdf in mobilegap in ios

i want to download a pdf file created in mobilegap in ios.but it is not working. when i click the download card button,it opens a pdf file but it is not downloading. i tried every possible code,but its not working.when i click the button,it opens the pdf but either the home button stops working or its not downloading.it is created in javascript


$(document).on('pageshow', '#downloadidcard', function(){



var b = new FileManager();
new FileManager().download_file('http://ift.tt/1DahtId','_blank',Log('downloaded success'));

var mobileNumber=localStorage.getItem("MOBILENO");
var memID=localStorage.getItem("MEMBERID");
//console.log("IDCARD URL.............http://ift.tt/1ETvvmi"+memID+"&mobileNo="+mobileNumber);
//window.plugins.fileOpener.open("http://ift.tt/1ETvvmi"+memID+"&mobileNo="+mobileNumber);
//window.plugins.fileOpener.open("http://ift.tt/1DahtId"+memID);

start_examples();/*
$.ajax({
context: this,
dataType : "html",
url : "http://ift.tt/1DahtId"+memID,
beforeSend: function() {
$.mobile.loadingMessageTextVisible = true;
$.mobile.loadingMessage = "please wait...";
//$.mobile.showPageLoadingMsg();
$.mobile.loading('show')
},
success : function(results) {
$('#contentview').html(results);
$.mobile.hidePageLoadingMsg();
},error: function (request, status, error) {
console.log(error+'............Request IDCARD Error...'+status+'.....'+request.responseText);
$.mobile.hidePageLoadingMsg();
alert('Network error please try later');
}
});*/
});



Aucun commentaire:

Enregistrer un commentaire