NetTalk Central

Author Topic: Update field/variable on lose focus?  (Read 596 times)

JohanR

  • Sr. Member
  • ****
  • Posts: 421
    • View Profile
    • Email
Update field/variable on lose focus?
« on: August 10, 2026, 06:48:23 AM »
Hi,

I have a mem form with one entry field and a button.

Is there a way to make sure the entry field fires the server side code or updates the session value if it loses focus.
Tabbing away from the field is fine, but typing a new value and clicking on the button does not everytime.

The button on click opens a new page/url

thanks

Johan




rjolda

  • Sr. Member
  • ****
  • Posts: 451
    • View Profile
    • Email
Re: Update field/variable on lose focus?
« Reply #1 on: August 10, 2026, 10:33:27 AM »
HI Johann,
I have seen the same issue.  In those cases I put a button on the form that says something like 'Press to Validate your entry'.  That way, they are told to do something. SO, if they complain that "they put in a value and it didn't work" then you can ask them if they pressed the "Validate button" - and it becomes your chance to educate them!
I am not sure if there is a $Script command that you can trigger before the form is closed but then it may not have the value they entered because they did not acknowledge it with a Tab or Enter.
Ron

JohanR

  • Sr. Member
  • ****
  • Posts: 421
    • View Profile
    • Email
Re: Update field/variable on lose focus?
« Reply #2 on: August 10, 2026, 08:35:26 PM »
Hi Ron

Thanks for the info
Was thinking along the same lines.

Another method that I am trying to get to work is using the SAVE button, this seems to do the field update correctly.

However this is the LOGIN page, and it was called from a page that requires the login
So the SAVE button URL does not work.

The issue comes in that I have added a few forms hanging off the login procedure and the _chain_ is at play, so it wants to go back to the page that called the login procedure.
These extra forms are for password resets, OTP's , new signups etc..

Still working through this.

regards
Johan


rjolda

  • Sr. Member
  • ****
  • Posts: 451
    • View Profile
    • Email
Re: Update field/variable on lose focus?
« Reply #3 on: August 11, 2026, 10:53:10 AM »
Hi Johan,
I did separate top menu items for Reset Password and for Create New User Account.  They do not have to be logged into the app to use these.  For password resets, they just enter their E mail address and press the Send Button - My code checks the e-mail and if it is a registered E mail I send them a link for Password reset.  That is a separate form from the login page - got too messy trying to do logins and password resets on same memform.  I allow new users to fill in a form and they need to enter their mobile phone number and their email ( their e mail address is their login).  I then send them a text with pin code and the link to use pin code to sign in and get new password.
I am not sure that you can trap the "Save" button on a memform. 
Ron