Script Triggers don't work in IWP except in very limited circumstances. Basically, the only way you can trigger a script is to click a button to run a script and then the script's actions (Such as go to field or go to layout) can trip script triggers.
That's why your script doesn't work in IWP.
The other issue that you are dealing with is one of the key limitations encountered when working with an interface based on a web browser. FileMaker sends a chunk of data across the network to your browser, then when you submit the record, any changes, new records, etc get sent back to the database. It's kind of like old fashioned radio communications where you send a person a message and he waits until you say "over", then he sends you a message and you wait until he says "over".
You just don't get that field edit by field edit reponsiveness that you expect with a FileMaker layout when you use FileMaker to access the file directly. That, in turn, requires a significant change in how you design your layout and scripts for web use as you just don't have as many options to work with.