Thank you for your post.
A Web Viewer will always display in the foreground under Mac OS X, so it will also display in the foreground under iOS. Instead, use a rectangle, no border, and send it to the back. Then set the rectangle as a button to execute the script (or script step).
Which works, (can be a do nothing script to just capture the mouse click/finger tab...) but won't the entire background then change color when you tap it?
Another option might be to set up a layout of global fields with auto-save enabled. Make your save button run a script that creates the appropriate new record and enters the data from the global fields into matching fields in this new record. A "cancel" button need do nothing more than clear all the global fields.
Yes, clicking the button in my solution would change the color when tapping. Your solution is definitely cleaner. Thanks!
Phil solution is definitly cleaner however it requires a lot of processing especially if the layout has 50 fields like mine.
TSGal solutions is simpler (I am lazy) and you can look at it from this piont of view ... if the user clicks on an empty space the color changes momentarily to alert him that he is clicking where he shouldn't.
I guess if the layout has small number of fields I will follow Phil's suggestion otherwise I will use the background box.
I found out that putting a transparent button to do nothing and cover the whole layout will solve this issue without turning the screen black when you click on a space.