KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Establishing HTML content in Web Area using Blink engine with WA SET PAGE CONTENT
PRODUCT: 4D | VERSION: 19 | PLATFORM: Mac & Win
Published On: December 30, 2021

When using a web area with “Use embedded Web rendering engine” turned on, the command WA SET PAGE CONTENT would normally not be able to be used to establish HTML content on load. The web area basically needs a bit of time to load before being able to call WA SET PAGE CONTENT. One simple solution is to use SET TIMER to delay the execution of WA SET PAGE CONTENT. For example, in the form method:

Case of
   : (Form event code=On Load)
   SET TIMER(1)
   : (Form event code=On Timer)
   SET TIMER(0)
   WA SET PAGE CONTENT(*; "MyWebArea"; Form.HTMLcontent; Form.baseURL)
End case

The above code will allow WA SET PAGE CONTENT to load HTML content in the web area when the form loads.