In the link to the online form , you wll have or can specify a property 'Source=' . If this is defined, once the form is closed / submitted, it will redirect to this location.
So for example if you create a 'thank you' page at //url/pages/thankyou.aspx, the URL to the form will include &Source=http%3A%2F%2Furl%2Fpages%2FThankYou%2Easpx
An example URL to a browser form is below:
http://portal2007.development.local/hr/_layouts/FormServer.aspx?XsnLocation=http://mossserver:83/hr/Forms/addresschangeform.xsn&SaveLocation=http%3A%2F%2Fportal2007%2Edevelopment%2Elocal%2Fhr%2FChangeofAddress&Source=http%3A%2F%2Fportal2007%2Edevelopment%2Elocal%2Fhr%2FChangeofAddress%2FForms%2FAllItems%2Easpx&DefaultItemOpen=1