NetTalk Central

Author Topic: Error messagebox does not appears  (Read 3154 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Error messagebox does not appears
« on: July 01, 2009, 07:09:36 AM »
Hi,
I need to validate a field, lets say, does not allow * character in a name.
You can try it modifying example 1
I add the following code to the Routines/Validate/Mailboxname

If Loc:Invalid <> '' then exit.
    if instring('*',MAI:MailBoxName,1,1)>0
       loc:Invalid = MAI:MailBoxName
       loc:alert   = 'MailBoxName:' & ' ' & p_web.Translate('you can''t use an * in the MailBoxName!')
    END

But when you enter an * and press save, the upper red error line appears ok, but not the message box error.
Its weird because it is a required field and this validation is almost the same in the same place and the message box does appears.

What am I doing wrong?
Alberto
-----------
Regards
Alberto

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Error messagebox does not appears
« Reply #1 on: July 02, 2009, 11:35:40 AM »
Alberto,
In the WebHandler procedure, there is an embed called ProcessLink.
The embed before Parent Call, I guess there is a statement:  self._popUpDone = 1
This prevents the popup to appear.
If it is there and you comment it out, t\you will see the red text AND the alert box.

Rene
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Error messagebox does not appears
« Reply #2 on: July 03, 2009, 07:58:32 AM »
>> and press save

The save button runs different validation code, which validates the whole record. Specifically, at that point the validate::field routines are not called.

The validate::field routines are only called when the field is dynamically valiadated as it is entered.

So right-click-source and look for more validation code (I think routine is validaterecord, but I'm not sure offhand.)

Cheers
Bruce