Announcement

Collapse
No announcement yet.

Refresh single form after a sc_ajax_message within OnValidate event or Before Update.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Refresh single form after a sc_ajax_message within OnValidate event or Before Update.

    Hi all,
    I got a form where I have cash in and cash out field.
    When both fields are null or 0 I show a message like "A value must be entered".

    Imagine to have save a record with cash in = 20 and cash out = 0.

    If you edit a yet saved record and then put 0 on one of two field, for istance cash in = 0 and press Update it shows the warning message correctly but retain on screen of the form the 0 value just entered. So the user see 0 instead of 20 that is the 'real' value it has.

    After the message I would like to show the value that was present before you entered 0.
    If I press F5 and after it ask to confirm and then I see the right value again i.e. cash in = 20

    How can I do this steps without asking or refreshing the entire page ? I mean after the message is shown I want to refresh the value of cash in to show 20 again.
    Probably I have to use ajax or js but I don't know how to realize it.

    Thanks
Working...
X