EasyManua.ls Logo

Siemens SIMATIC S7-1200 - Page 1077

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Web server
12.7 User-defined Web pages
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
1077
JavaScript "lang.js" in "script" folder
The function "DoLocalLanguageChange()" is in the lang.js file. This function calls the
"SetLangCookie()" function and then reloads the window that is displaying the HTML page.
The function "SetLangCookie()" constructs an assignment that assigns the value from the
select list to the "siemens_automation_language" cookie of the document. It also sets the
path to the application so that the switched page, and not the requesting page, receives the
value of the cookie.
Optionally, in the commented section, the page could set an expiration value for the cookie.
function DoLocalLanguageChange(oSelect) {
SetLangCookie(oSelect.value);
top.window.location.reload();
}
function SetLangCookie(value) {
var strval = "siemens_automation_language=";
// This is the cookie by which the Web server
// detects the desired language
// This name is required by the Web server.
strval = strval + value;
strval = strval + "; path=/ ;";
// Set path to the application, since otherwise
// path would be set to the requesting page
// and this page would not get the cookie.
/* OPTIONAL
use expiration if this cookie should live longer
than the current browser session:
var now = new Date();
var endttime = new Date(now.getTime() + expiration);
strval = strval + "; expires=" +
endttime.toGMTString() + ";";
*/
document.cookie = strval;
}
Note
If your user
-defined Web page implementation includes HTML files within language-specific
folders (en, de, for example) and also HTML files that are not in the language
-specific
folders, not
e that you cannot define enum types with the AWP_Enum_Def command in files
in both locations. If you use enums, you must define them either within files in the language
-
specific folders or within files outside of the language
-specific folders. You cannot make
enum declarations in files in both places.

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals