Hi there,
this is bugging me for month now. I am close to a suitable solution, but I am still suffering. My Scriptcase support ticket helped me to get close to a solution, but no solution yet. I am really frustrated with the SC error handling…
- I have 4 date/time fields, all grouped and format dd-mm-yyyy hh:mm or mm-dd-yyyy hh:mm depends on aktive language
- I am comparing dates with Ajax OnClick, displaying sc_error_message if one date is invalid compared to another
- I use sc_set_focus with Ajax OnBlur so it will take user back to the date field which has invalid date
- But…when a user enters a wrong format or a date that is not in calendar (e.g. 99-99-2011 99:99), Scriptcase throws it’s own “Invalid Data” sc_error_message and moves on to the next field
Now…how can I check if Date is valid when it comes to format and range??? Is there any way to perform the sc_set_focus OnBlur when Scriptcase throws an automatic sc_error_message with a specific field?
Also, when I use my calendar with date field, my Ajax Events are not fired at all. Therefore the whole error treatment does not perform and I would need another check with OnValidation, which I would like to avoid.
It’s such a basic thing and Scriptcase is a powerful tool, but there is no suitable solution for error treatment yet or I am just incapable of using SC.
I used to handle errors OnValidation before, showing all sc_error_messages in 1 box when I try to add or update data. But here also I have more then 1 issue. I can’t focus invalid fields and I can’t tag single fields as invalid. Also the error message is shown at top of page and there is no auto scrolling when I perform an update of data. Therefore user hits the Update button in a long form and can’t see the error box that is at top of a long form. The auto scrolling works with adding a new data set though.