NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: hkalmbach on October 07, 2020, 07:09:12 AM

Title: Manually saving form contents
Post by: hkalmbach on October 07, 2020, 07:09:12 AM
Hello,

I have a NetForm, based on Memory, and do updates to database manually with a button, calling the form itself with an action parameter. This action parameter is evaluated on GenerateForm, and 
gets the contents by GSVs on the form fields, then does the save action.
This works well beside one point: there is only one text field and the save button on the form. If I change the text WITHOUT leaving the field by tab the entered content is not available by a GSV.
If I first leave the field and then press my save button the text is available.

Can I do something to get the text without accepting the textfield, that means write text and directly press SAVE?

Thanks a lot

Cheers
Heinz
Title: Re: Manually saving form contents
Post by: DonRidley on October 10, 2020, 11:01:46 AM
I think I understand what you are doing.

If you can, post a screenshot of the form in question.

Thanks.
Title: Re: Manually saving form contents
Post by: Bruce on October 11, 2020, 06:42:31 PM
>> If I change the text WITHOUT leaving the field by tab the entered content is not available by a GSV.

correct. When you goto another field (pressing tab, clicking a button) then the new value in the text field is sent to the server, which in turn writes it to the session.

When you press the button a Post is sent to the server for action.

So when you go directly from the text field to the button, two separate requests are sent to the server. These are processed on different threads. In your case you are seeing the button code complete before the text value is written to the session.

I suspect if you inspect the Post in the Log you'll see the text value is being sent through as a Value. So you can access it there with p_web.GetValue, instead of p_web.GetSessionValue.

cheers
Bruce