04-25-2023, 04:51 PM
I am using Intraweb 15.3.3 with Rad Studio 10.2.3 (C++ Builder).
I need to be able to change the template loaded by the form each time the user chooses a different language.
The language selection is done through JavaScript : executeAjaxEvent(LanguageCode, null,"ChangeLanguage", true, null, false) which unfortunately does not force a refresh on the form!
ChangeLanguage(TStringList *Parametres)
{
UnicodeString CodeLanguage = Parametres->Values["Code"];
IWTemplateProcessorHTML1->Templates->Default = "myTemplate-" + CodeLanguage + ".html";
}
IWForm->AsyncReload() works but it prompts a message to the user which is a problem!
So, how can I force a refresh on the form when a new template is loaded without any message prompted to the user? Or another way to load a new template with form refresh?
I need to be able to change the template loaded by the form each time the user chooses a different language.
The language selection is done through JavaScript : executeAjaxEvent(LanguageCode, null,"ChangeLanguage", true, null, false) which unfortunately does not force a refresh on the form!
ChangeLanguage(TStringList *Parametres)
{
UnicodeString CodeLanguage = Parametres->Values["Code"];
IWTemplateProcessorHTML1->Templates->Default = "myTemplate-" + CodeLanguage + ".html";
}
IWForm->AsyncReload() works but it prompts a message to the user which is a problem!
So, how can I force a refresh on the form when a new template is loaded without any message prompted to the user? Or another way to load a new template with form refresh?