Add a tab to a form that launches a URL

In this example, a new tab is added to form AR10 that lets a user view a website (in this case, a weather forecast at weather.com).

function TABREGION_OnAfterTabActivated(tab) 
{ 
    // check tab 
    if (tab === "TF0-9") 
    { 
        // collect values from screen and build URL 
        const sZip = lawForm.getFormValue("out15"); 
 
        // note: not all weather websites allow embedding 
        const sURL = "https://www.weather.com/weather/today/" + sZip; 
 
        // set the browser as an object to then set its source 
        const elem = lawForm.getFormElement("browser1") 
        elem.src = sURL 
    } 
}