NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Richard I on June 22, 2023, 07:59:01 PM

Title: p_web.SetTheme('Metroblue') wont compile
Post by: Richard I on June 22, 2023, 07:59:01 PM
Hi All,
My app  doesn't like
 p_web.SetTheme('Metroblue')
unless I have it in the wrong embed?
I have placed it at the bottom of the login code in Validate Update
You said it could be called once the user had logged in?

Is there something else I need to do?
Thanks
Regards,
Richard
NT 12.62
Title: Re: p_web.SetTheme('Metroblue') wont compile
Post by: Bruce on June 23, 2023, 04:26:12 AM
>> My app  doesn't like

define "doesn't like"
Title: Re: p_web.SetTheme('Metroblue') wont compile
Post by: Richard I on June 23, 2023, 01:48:17 PM
Apologies Bruce,
Following your earlier advise to include p_web.SetTheme('Themename')
I have , immediately following the User login Code in the login window embed-  Validate Update 3 Inside included  p_web.SetTheme('Metroblue')
The app wont compile- the compiler returns two errors "Unknown Procedure label" and "Field not Found:" SETTHEME

Thanks
Regards,
Richard
NT12.62
Title: Re: p_web.SetTheme('Metroblue') wont compile
Post by: Jane on June 23, 2023, 03:39:40 PM
Try
p_web.ChangeTheme
Title: Re: p_web.SetTheme('Metroblue') wont compile
Post by: Richard I on June 23, 2023, 06:05:14 PM
 In the login Window  validate Update embed I have-

        User:password = Loc:Password
        IF Access:User.TryFetch(User:bypassword) = Level:Benign     
        p_web.SetSessionValue('ThemePreference',User:ThemePreference)
        _theme_ = p_web.GetSessionValue('ThemePreference')
        p_web.Trace(_theme_)
        p_web.Changetheme(_theme_)

The Trace statement is returning the desired theme as set in the user's profile, which is different from that theme set as the default.

 How can I get p_web.Changetheme(_theme_) to override the default theme during the session and thereby
 set the theme for the session to be User's theme choice on all subsquent forms

Thanks
Richard
Title: Re: p_web.SetTheme('Metroblue') wont compile
Post by: Richard I on June 25, 2023, 04:58:19 PM
Sorted !
Thanks for the help, Jane.
Regards
Richard
Title: Re: p_web.SetTheme('Metroblue') wont compile
Post by: jking on June 29, 2023, 06:38:22 AM
Richard,

     Can you share the final solution Jane helped you find?

Thanks,

Jeff
Title: Re: p_web.SetTheme('Metroblue') wont compile
Post by: Richard I on June 29, 2023, 03:26:07 PM
Hi Jeff
Happy to-
Attached as a text file.
Please let me know if anything is unclear to logtimer@yahoo.com
Cheers
Richard