stateless forms - how to close the window once data is entered?

stateless forms - how to close the window once data is entered?

 

Hi,

I am trying to use a stateless form to populate another database on creator. 

When a customer enters the data and clicks the submit button, the data is stored in the database. In order to avoid the customer submitting the data over and over again, I want to close the windown and I have the following code:

openUrl("http://creator.zoho.com/alhudaonlinecourses/alhuda-student-data/#Script:page.parent.close","same window");

But the window doesnt close, nothing happens. Please help

Thansk