Is there any method/event to run a server script when I click on cancel form button?
You do not say what version, and I think it may be different in 9 than in 7, but the principle would still be the same:
http://metastorm.processmapping.com.au/post?id=1501192
and related information:
http://metastorm.processmapping.com.au/post?id=1748478
and
http://metastorm.processmapping.com.au/post?id=1874318