Highlighted

validate.nullTest working only with the EMAIL button

Avatar

Guest

13-10-2008

Hello,



This piece of code is working just great when submiting a form by

email.



TextField1.validate.nullTest = "error"; (highlighting the empty fields when pushing the EMAIL button)



On the print button it doesn't have any effect. How can I highlight

the required fields when clicking the print button the same easy way

as with the email button? (I have other highlighting scripts but I want to use the exact same method as used on EMAIL)



Your input is really appreciated! And any explanations for this stupid behavior?

Replies

Highlighted

Avatar

Guest

13-10-2008

To make this functionality you can use two buttons trick:

First button Print, onClick event should has this script: realPrintButton.execEvent("click").

Second button is invisble Print button.

So, when you click on your first button print validation is appear and real print will be executed.