In Web Generation (INTERNET), have been successfully fetching a UI element (control) using the Gen browser exit userOnLoad() with JavaScript as per below but it is not working in Web View.
function userOnLoad()
{
var element=document.getElementById(“controlName”);
alert(element.value)
}
Also in Web View, it is noticed that the control "ID" keeps on changing on each refresh of the page.
Release : 8.62
Component : ECLIPSE WEB VIEW
Web View has a different architecture to Web Generation e.g. Web View dynamically updates its content and browser caching does not work with it. That may be relevant to the JavaScript currently being used and the change of control "ID" on page refresh behaviour.
After changing to add prefix "parent." the code then worked in Web View i.e.
function userOnLoad()
{
var element=parent.document.getElementById(“controlName”);
alert(element.value)
}