Doing CancelAction in PreSave Event of the Form is not working



Giving the following Code in PreSave Event of Form is not working properly.

xfa.event.cancelAction = true;

xfa.host.messageBox("PreSave - Came In" + xfa.event.cancelAction);

This piece of code always displays the message as "PreSave - Came In false", While execution.

Basically, I am trying to do the following:

I have Right Enabled PDF's, so that User can Save that PDF

Inside the PDF, I have few Fields that should give me a total of 100. [5 Decimal Field's Value equalling 100]

User Opens that PDF and enters value in those 5 fields

If User attempts to save, the Script present inside the PDF will Prompt the User saying that "Valus is not Equal to 100" and also the Script should cancel the Save Event trigerred by the User.

Please give me guidance in doing this...

Thanks in Advance

With Regards

SriRamu SR