Hi sriraag
The following steps will walk you through to solve your problem
1. Open form in design mode
2. Go to Properties window of button
3. click on 'Edit Form code' button
4. write the following code in 'OnClick function'
Xdocument.Save();
And the form must be full trust, not just from the same domain.
Marking the form as coming from a Trusted Site is not sufficient.
You can make the form fully trusted by:
A) Registering it on each user's computer using an msi, or jscript file.
B) Digitally Signing the form (SP1 only)
Madhuri
http://www.ggktech.com