Some Web Interface Connection Secrets 8.2
Working with an alternative interface on managed forms 1C is available through HTML. An alternative interface may be needed if the standard 1C controls are not enough, but you want something more. This article lists some secrets of working with the web interface on managed forms 8.2.
Showing Html page on 1C managed form
To display an HTML page, you need to insert an HTML Document Field on the form and place the HTML code in the data source. You need to keep in mind the following: thin and web client on Internet Explorer work in a special way. In these two cases, Internet Explorer is used in IE 7 compatibility mode.
The first secret is that the thin client can be switched to compatibility mode with an older version of IE. For this you need to use meta X-UA-Compatible. So on Windows 7 after adding
<meta http-equiv="X-UA-Compatible" content="IE=9" >
You can use SVG objects, for example:
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red"></circle></svg>
You can transfer the IE web client to a more modern version of compatibility by placing the 1C web client in an IFrame and specifying the compatibility meta-tag in the parent html. An example of how this can be done is shown here:
habrahabr.ru/post/183016But at the same time, normal operation and display of the web client is not guaranteed, since 1C initially designed the web client on the basis of compatibility with IE6 / 7.
The second secret is that the layout of html-layouts in text mode without a visual editor 1C spoils after the layout is closed in the configurator. For example, if you insert svg-definitions on the html-layout, then after reopening the configurator you will see a broken html (pay attention to the head header).

Therefore, if your layout is more complicated than showing the picture, I advise you to save the html-code also in another place.
Storage of everything in a row in common pictures
A modern web page is not limited to html alone. In addition to her go pictures, js / css-files. The traditional approach allows storage and access to pictures placed in common configuration pictures, but with js / css 1C developers have to fake. Text files are either archived and unpacked before displaying the page or placed entirely in html. This approach does not use the cache for get requests built into almost every browser.
My experience was to put a java-script into common pictures. This experience was partially successful, i.e. All browsers and thin client launched jQuery, except IE.
If someone knows a secret and can make this method work on IE, please unsubscribe. The steps are as follows:
1. Create a general picture and place any picture in it.
2. On the HTML layout, in the editing mode, select any text and select the common picture through the Elements-Link menu
3. Insert the text from the link into the script block
4. Replace the overall image with JavaScript content
')
Built-in 1C framework for the web client
Few people know that the 1C web client includes a framework that simplifies working with form elements. The framework works on JavaScript. Accessing it is possible through parent.WebUI. its functions require additional research, but the properties are as follows:

In theory, this framework can be used to call 1C server procedures. In this case, the full integration of the html-field with other elements of the controlled form will occur, which will entail a platform independence. Now feedback is achieved through WebBrowser Control, which is tied to Windows.
Keyword __STYLE__
Long puzzled what does the __STYLE__ keyword mean, which 1C automatically substitutes an empty html layout into the template. But research of requests showed that __STYLE__ is not replaced by anything, and the server returns 500 error to this request: Internal Server Error.
