Área Web
Visão Geral
The Web areas can display various types of Web content within your forms: HTML pages with static or dynamic contents, files, pictures, Javascript, etc. The rendering engine of the Web area depends on the execution platform of the application and the selected rendering engine option.
É possível criar várias áreas Web no mesmo formulário. Note, however, that the use of Web areas must follow several rules.
Several dedicated standard actions, numerous language commands as well as generic and specific form events allow the developer to control the functioning of Web areas. Specific variables can be used to exchange information between the area and the 4D environment.
The use of Web plugins and Java applets is not recommended in Web areas because they may lead to instability in the operation of 4D, particularly at the event management level.
Propriedades específicas
Variáveis associadas
Duas variáveis específicas podem ser associadas a cada área da Web:
URL
--to control the URL displayed by the Web areaProgression
-- to control the loading percentage of the page displayed in the Web area.
Motor de renderização Web
You can choose between two rendering engines for the Web area, depending on the specifics of your application.
Selecting the embedded web rendering engine allows you to call 4D methods from the Web area.
Acesso a métodos 4D
When the Access 4D methods property is selected, you can call 4D methods from a Web area.
This property is only available if the Web area uses the embedded Web rendering engine.
Objecto $4d
O motor de renderização web embebido de 4D fornece à área um objeto JavaScript chamado $4d que pode ser associado a qualquer método projeto 4D utilizando a notação objeto ".".
For example, to call the HelloWorld
4D method, you just execute the following statement:
$4d. HelloWorld();
JavaScript is case sensitive so it is important to note that the object is named $4d (with a lowercase "d").
A sintaxe das chamadas aos métodos 4D é a seguinte:
$4d.4DMethodName(param1,paramN,function(result){})