Validation from a task pane

Z

Zoltan Fedor

Hello Experts,
We have an application which add a task pane (html file with Jscript) to the
InfoPath form with a Submit button. When the user hits Submit, all XML data
sent to the application.
I would like to add a validation feature, so when hitting the Submit button,
the Jscript should check if all required fields are set. I found the Errors
collection and checking the errors.count value in the OnContextChange Event
and write this value to an XML field. The Jscript checking this XML value
when hitting the Submit button. This seems to be a perfect solution,
BUT
If the user fills the last required field - and leave the cursos within the
field - the OnContextChange event does not triggered, so the Jscript saying
there is a validation error in the form. If the user makes an additional
click to an other field before click Submit, there is no problem....
But it is not so user friendly solution... Can I initiate some context
change from Jscript? So when clicking Submit, the script initiate a context
change in the form, the OnContextChange event triggered, and all is OK...
Or do you have any other idea?
Any help is appreciated,
Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top