title: How to invoke local peripheral device from web script
body: <p>I am confused about invoking local app from web site.
  Is there any way to start an ipad/iphone app from web scripts?  I remember that there is ActiveX with IE which could start a local device such as a camera or printer.  JavaScript could invoke ActiveX.  But there is no activeX in iOS. Here is my problem: How could I start local device from a webpage? Does anyone have the same problem? I have one method but I don't know if it is feasible: </p>
  
  <ol>
  <li>UIWebView could execute JavaScript by stringByEvaluatingJavaScriptFromString.</li>
  <li>write a function in a page with JavaScript, which responds to an event on the page (button click, etc.), then change the state.</li>
  <li>start a thread to inquire the state.  When the state changes , invoke local apps.</li>
  </ol>
  
  <p>Is that possible or any better way ?</p>