Suppose you have a form that’s used for redeeming prizes for points accumulated for dining at the corporate cafeteria. As each prize is chosen, the choice is written to the prize redemption table, using cached updates. The points aren’t actually spent until you press the Redeem button, and you can cancel all the choices that have been made and start over by pressing the Start Over button. The following is the onClick event handler for the Start Over button.

function startOverButton_onClick( )

   form.rowset.parent.database.abandonUpdates( ) // Discard cached updates 

   form.rowset.abandon( ) // and current choice