2012-04-23 23 views
1

有沒有人有任何想法如何獲取documentUNID到phonegap的文件傳輸功能?如何獲得Serverside值到phonegap參數

我tryed一些解決方案,但似乎沒有任何工作:

首先我想:

function uploadPhoto(imageURI) { 

    var options = new FileUploadOptions(); 
    options.fileKey="file"; 
    options.fileName=imageURI.substr(imageURI.lastIndexOf('/')+1); 
    options.mimeType="image/jpeg"; 

    var params = new Object(); 
    params.value1 = "test"; 
    params.id = XSP.getElementById("#{id:inputText1}").value 

    options.params = params; 

    var ft = new FileTransfer(); 

    ft.upload(imageURI, "serverURL", win, fail, options); 
} 

這導致「功能無法找到」。

我的第二個IDE的是通過使用Document1.getDocument.getUniversalID()

這也導致計算documentID「功能無法找到」。

已annyone任何想法如何獲得Serverside值的這個phonegap函數的參數?

回答

0

您需要將括號添加到getDocument部分,以便它讀取Document1.getDocument().getUniversalID()。這可能會解決您的問題。