2

I've written a native app that utilises a hardware attachment to the iPad2 that scans barcodes and successfully displays it on the screen. How can I send that data (barcode) and send it to a UIWebview that loads a web page with form elements? I want to be able to scan the data and have that scanned data show up on the web form (auto-fill the web element/textfield with the barcode after scanning).

A simple example: Press the scan button on the screen, grabs the barcode, sets the Controller's variable and in the UIWebView (say, loads up google.com), auto-inputs that barcode in the Search textfield.

I can do everything up to setting the Controller's variable, just don't know how to auto-input into a web element like a text field on a site like google.com

buckbuck
  • 21
  • 3
  • For injecting code into a web page at runtime, take a look at the `stringByEvaluatingJavaScriptFromString:` method. –  Dec 29 '12 at 17:06
  • Found this post.. Is this what you're referring to? http://stackoverflow.com/questions/766627/uiwebview-stringbyevaluatingjavascriptfromstring-not-changing-text-box-value – buckbuck Dec 29 '12 at 17:16

0 Answers0