You could also use dynamic action.
you should really use a "Set Value" dynamic action for that, that's much more transparent than using the onclick definition in the button attributes.
Member of the APEX development team
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins