Thank you for taking the time to get back to me. Can you do me a favor and show me full code example of where to put it? Do declare a <script type="text/javascript"> and put it in it? or do I put it in the php side?
The form can be any Yii generated form as far as the submit button has id and in the jquery code you capture this id value in the portion input[id="your id name here"];
Give it a try and let me know what works and what not and I will try to help you further.