How do I do native things (such as open a new Window, or use the camera) when the user taps a button in a WebView?
You can do this only from a webview with a local source ( not a remote one ) using events.
Take a look here ( 3rd post )
Here is setting a variable, but you can adapt it.
If it's a remote url,
First you have to create an Ti event listener somefunction, on that remote url button or link, you add this Ti.App.fireEvent('somefunction') for triggering. That should be working for android last time i heard.
But for iphone/ipad, you'll need that to be a locate web, not remote web. So the get-around is after finished the step above, you have to assign your webview html content using XHR to get the remote content first, or from a temp webview. I use both on different apps. XHR is faster as it doesn't load the web content media first.
Like this for example.