NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: osquiabro on January 25, 2013, 03:36:59 AM

Title: Focus
Post by: osquiabro on January 25, 2013, 03:36:59 AM
exist a function for set focus via code??
Title: Re: Focus
Post by: Bruce on January 25, 2013, 04:45:02 AM
yes, but you'll need to be a lot more explicit about the context.

cheers
Bruce
Title: Re: Focus
Post by: osquiabro on January 25, 2013, 05:33:36 AM
i have a procedure for change password with this part of code:

if  Loc:CurrentPassword =Use:Password   
    loc:alert='Invalid New Password, is equal to Current password'
    loc:Invalid=true       
    EXIT
end

when occurs this error i need to set focus to Loc:CurrentPassword
Title: Re: Focus
Post by: Bruce on January 25, 2013, 06:10:24 AM
I haven't tested this, but I think;

p_web.SetValue('SelectField','Loc:CurrentPassword')

will do it.
(before the Exit obviously)

cheers
Bruce
Title: Re: Focus
Post by: osquiabro on January 25, 2013, 07:32:22 AM
not work i have mi code in ValidateUpdate in memory form..
Title: Re: Focus
Post by: Rene Simons on January 28, 2013, 09:14:34 AM
Hi,
Shouldn't it be:

Loc:invalid = 'loc:Currentpassword' in stead of loc:invalid = true  ?

Anyway, loc:invalid must be equal to te field name that is in error.

Rene
Title: Re: Focus
Post by: osquiabro on January 28, 2013, 01:27:59 PM
thank you very much! worked...
Title: Re: Focus
Post by: osquiabro on January 30, 2013, 05:29:38 AM
stopped working with version 7.04.. go back to 7.03
Title: Re: Focus
Post by: Bruce on January 30, 2013, 09:34:57 PM
I can't think of any change that would have affected it in 7.04. I guess post an example and I'll take a look.

cheers
Bruce
Title: Re: Focus
Post by: osquiabro on February 01, 2013, 05:38:44 AM
i think that the  jQuery Dialogs has affected ..
Title: Re: Focus
Post by: osquiabro on February 06, 2013, 04:41:26 AM
7.05 don't work Focus, only work in 7.03 and back

this is my code:

IF Loc:CurrentPassword = ''
    loc:alert='Invalid Current Password'
    Loc:invalid = 'Loc:CurrentPassword'
    exit
END

IF  Loc:NewPassword=''
    loc:alert='Invalid New Password'
    Loc:invalid = 'Loc:NewPassword'
    EXIT       
END

IF Loc:NewPasswordConfrmation = ''
    loc:alert='Invalid Confirmation Password'
    Loc:invalid = 'Loc:NewPasswordConfrmation'
    exit
END

if  Loc:NewPasswordConfrmation <> Loc:NewPassword
    loc:alert='Invalid Confirm New Password'       
    Loc:invalid = 'Loc:NewPasswordConfrmation'
    Exit
end

p_web._OpenFile(Users)
Use:UserId = p_web.GSV('UserId')
Access:Users.Fetch(Use:PK_Users)

if  Loc:CurrentPassword =Use:Password   
    loc:alert='Invalid New Password, is equal to Current password'       
    Loc:invalid = 'Loc:CurrentPassword'   
    EXIT
end

if Loc:CurrentPassword <> Use:Password       
    loc:alert='Invalid Current Password' 
    Loc:invalid = 'Loc:CurrentPassword'
ELSE
    Use:Password = Loc:NewPassword
    PUT(Users)
END
p_web._CloseFile(Users)
Title: Re: Focus
Post by: Bruce on February 06, 2013, 05:27:19 PM
if you can duplicate the effect in one of the examples (perhaps example 3) and post that here that would be great.

cheers
Bruce
Title: Re: Focus
Post by: osquiabro on February 07, 2013, 02:46:35 AM
see attachment..

[attachment deleted by admin]
Title: Re: Focus
Post by: Bruce on February 08, 2013, 12:18:18 AM
you always need to include the dictionary with examples (because when you convert a dict from C6 to C8 a unique dict is created.)

also always include data files if you can, because this makes the example "stand-alone" for future readers of this thread.

lastly it is really helpful if you include instructions on what to do when the app runs. Where to go, and what to type etc. Explain what you expect to see, and what you do see.

Cheers
Bruce
Title: Re: Focus
Post by: osquiabro on February 08, 2013, 02:17:57 AM
again see the attactment, i include new procedure call ChangePassword.

[attachment deleted by admin]
Title: Re: Focus
Post by: osquiabro on February 28, 2013, 03:56:27 AM
7.06 same problem...