2013-01-31 132 views
0

有一點你的時間。我必須開發從網頁調用的條形碼應用程序。現在我已經寫了調用該應用程序的JavaScript。一旦應用程序完成閱讀條形碼,我必須回到我的網頁,條形碼數據應該保存在網頁的某個文本框中。iPhone應用程序發回數據到網絡服務器

我的麻煩是: - >當網頁觸發應用程序,我發送頁面到後臺。現在,當應用程序將數據返回時,如何在不刷新頁面的情況下使用內容填充此網頁的文本框對象。 (頁面內還有其他數據,luser也登錄)

回答

0
Here goes the page which calls the app..<html> 
<head> 



<script src="/Users/User_admin/Downloads/appl/src/main/webapp/static/scripts/gtx/jquery.min.js"></script> 
<script type="text/javascript"> 



$(document).ready(function() { 
$('#fill').click(function(){ 
$('#div2').load('/Users/User_admin/Desktop/scanner/barcodescanner/local html files/dummy.html #url'); 
}); 
}); 


function startMyApp() 
{ 
    document.location = 'scannerApp://'; 
} 

</script> 

</head> 

<body align="center"> 

<h3> Product Info </h3> 
<br><br><br> 
<label> Product Name </label> 
<input type="text"/> 
<br><br> 
<label> Product Category </label> 
<input type="text"/> 
<br><br> 
<label> Serial Number </label> <div id="div2">[]</div> 

<input id="launch" type="button" onclick='startMyApp()' value="Launch Application to scan serial number"> </input> 

<br> 

<input id="fill" type="button" value="Press button to fill the detail"></input> 


</body> 

</html> 
相關問題