This topic is locked
[SOLVED]

 How to set a form;s value at the client after event.?

4/5/2019 8:56:28 AM
PHPRunner General questions
A
acpan author

Hi,
I read the online manual, but can't get it right.

  1. I have created a button on edit page.
  2. When pressed, it will get some values from javascript (eg. calculation of new values) in "client before" event

    and change the values on the edit page fields (first 2 fields) on the fly. No problem, as i can access the fields and set its value using pageObj.
  3. At the same time when the button is pressed, Server side event will pull some data from the DB and pass to the "Client after" event. (No problem here).
  4. My problem is, i need to update the form's 3rd field with the new value from the server side event, at the "client after" event.

    How to access the page object in the "client after" event, to set a new value like "client before event"?
    Any idea will be very helpful. Thanks
    ACP

admin 4/5/2019

You should be able to access fields in ClientAfter in the same manner you access them in ClientBefore. Except for using setValue() instead of getValue().

admin 4/5/2019

You should be able to access fields in ClientAfter in the same manner you access them in ClientBefore. Except for using setValue() instead of getValue().

A
acpan author 4/5/2019



You should be able to access fields in ClientAfter in the same manner you access them in ClientBefore. Except for using setValue() instead of getValue().


Thanks Sergey,
Yes, it works perfectly. Didn't see we can use that when i looked at the description:
Parameters

result - javascript object with server response

ctrl - button object
version 10.1 is an amazing product !
ACP