NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Nick on December 18, 2013, 04:22:41 PM
-
Hi,
I want to calculate a value by using a button and put the result into a field on a form.
I use the "send new value to server" and calculate the value there.
But how/where can I put that into a field on the the same form?
Thanks,
Nick
-
- In the "send new value to server" embed, place the result of your calculation into a session variable. e.g. p_web.SSV('Result', varResult)
- Add a Display field on the form where the text of the field is the session variable. p_web.GSV('Result')
- In the template for the button that is calculating the result, on the "Client-Side" tab add the display field to the fields to be reset.
When the user pushes the button the result of the calculation will appear in the display field.
I hope this helps.
Rob
-
Hi Rob,
>>- In the "send new value to server" embed, place the result of your calculation into a session variable. e.g. p_web.SSV('Result', varResult)
>>- Add a Display field on the form where th e text of the field is the session variable. p_web.GSV('Result')
>>- In the template for the button that is calculating the result, on the "Client-Side" tab add the display field to the fields to be reset.
"where the text of the field is the session variable" I missed that part. Thanks!
But what to do if the field is a string (input) field? It has no place (as far as I see) to put this p_web.GSV() in?
(the field I use can be filled by the calculation but may be entered by hand too)
Nick
-
Never mind, got it!
Thanks.
Nick