NetTalk Central

Author Topic: cannot get field to be re-selected  (Read 2408 times)

cwtart

  • Full Member
  • ***
  • Posts: 130
    • View Profile
    • CommPay Software
    • Email
cannot get field to be re-selected
« on: August 19, 2013, 05:35:33 AM »
I have a memory form with two string entry fields. When the first field has data entered and is tabbed out of I run code in the "Add Server Side Code" embed. The code validates the string and if all is okay it clears the field and is supposed to reselect the same field. This is the code:

  TechSale_PartNumber = ''
  p_web.SetSessionValue('TechSale_PartNumber','')
  p_web.SetValue('SelectField',Clip(loc:formname) & '.TechSale_PartNumber') 

The field is clearing just fine but the field is not being reselected - the 2nd field, placed after the first field, is being selected.

What am I doing wrong?

NT 7.18

Chuck


cwtart

  • Full Member
  • ***
  • Posts: 130
    • View Profile
    • CommPay Software
    • Email
Re: cannot get field to be re-selected
« Reply #1 on: August 19, 2013, 05:54:07 AM »
I fixed my problem by moving this code:

p_web.SetValue('SelectField',Clip(loc:formname) & '.TechSale_PartNumber')

from the "Add Server Side Code" embed to the "Add Late Server Side Code" embed.

Thanks anyway.

Chuck