Hello, first post here.
I wanted to thank jaboda for his extremely useful tip!
The reason I needed something like this was to be able to "auto-submit" data at specified intervals, to avoid the possibility of users timing-out while editing a large form.
The top.iwp.executebuttonscript command can be useful, but it's limited because it's tied to a specific button in a specific layout and record.
Digging into the fmp_iwp.js file, you can find all available javascript commands that can be called using jaboda's tip (always add "top.iwp." before the command name).
I tried the top.iwp.editsubmit command that is tied to the submit button, but it only worked when the toolbar was visible. I found in the fmp_iwp.js file that the editsubmit command would check if the submit button was there and then call another command (submitAndContinue()) if it was the case.
So here's a timer script that will auto-submit every 15 minutes. Follow jaboda's instructions and put the following in the timer.html document:
<script type="text/javascript"><!--setTimeout("top.iwp.submitAndContinue();",900000);// --></script>
BTW I'm not sure exactly where the fmp_iwp.js file is on the server, I got it by saving an IWP page with Google Chrome and including all assets.