Hi All,
In a button on a NetWebForm I do some checking. If an error occurs, I would the message to appear just below the sub heading. So set loc:Alert = 'Oops, this is not good'. The code is in the Validate::MyButton Routine. When the error occurs loc:Alert is set, followed by a call the SendAlert routine and then an exit from the routine is done preventing the rest the code to process.
This all is working fine except that loc:Alert isn’t reset if the user click another button, selects a record, etc. I guess I can clear and the call the SendAlert routine in the Validate::OtherControl Routine of all other controls, but there might be a better solution.
My code is:
Validate::MyButton Routine
IF p_web.GSV('Oops') = 1
!loc:invalid = 'MyButton' Seems to make no difference
!MyButton = true
loc:Alert = 'Oops, this is not good'
DO SendAlert
EXIT
END
! End of "Validate New Value"
If p_web.RequestAjax = 1 and p_web.ifExistsValue('NewValue')
ElsIf p_web.IfExistsValue('Value') !FormFieldPicture = !FieldPicture =
End
do ValidateValue::MyButton ! copies value to session value if valid.
do Value::TabArg !1
do Value::TabArgT !1
Cheers,
Koen