Customize code on web form submit

I created Company registration web form.
On submit this form I want to create new site for that company.
For that I get code from bench-manager setting file.
But how I customize the code when web form submitted?
I made changes in web_form/company/comapny.js.
its not allowed me to use method from it.
please help me