【问题标题】:iPhone app sending data back to webserveriPhone 应用程序将数据发送回网络服务器
【发布时间】:2013-01-31 18:01:37
【问题描述】:

你的一点时间。我必须开发一个从网页调用的条形码应用程序。现在我已经编写了用于调用应用程序的 javascript。应用程序读取完条形码后,我必须返回我的网页,条形码数据应保存在网页的某个文本框中。

我的烦恼是: -> 当网页触发应用程序时,我将页面发送到后台。现在,当应用程序返回数据时,我如何在不刷新页面的情况下使用内容填充网页的文本框对象。 (页面内还有其他数据,还有一个luser登录)

【问题讨论】:

    标签: iphone barcode barcode-scanner zbar-sdk zbar


    【解决方案1】:
    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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-11-11
      • 2012-04-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-10
      • 1970-01-01
      相关资源
      最近更新 更多