Tech Tip: Display specific section of website in Web Area
PRODUCT: 4D | VERSION: 18 | PLATFORM: Mac & Win
Published On: January 25, 2021
Suppose that you want to display a website in your web area, but you want it to load at a specific section. If you know the name of the "id" for the section's HTML tag, you can easily link to it by appending "#" plus the id name to the website's URL.
For example, say that you want to automatically load the "Syntax" section of 4D's Wikipedia page. Quick inspection of the page's HTML source shows that the section has the id name "Syntax". Then, you can insert code like the following in the On Load event case of your web area:
$url:="https://en.wikipedia.org/wiki/4th_Dimension_(software)" $id:="Syntax" WA OPEN URL(*;"Web Area";$url+"#"+$id) |
Now, when your web area loads, it will automatically jump to the Syntax section.