CA Gen Web View userOnLoad fetching element/control does not work (works in Web Generation)
search cancel

CA Gen Web View userOnLoad fetching element/control does not work (works in Web Generation)

book

Article ID: 218534

calendar_today

Updated On:

Products

Gen - Workstation Toolset

Issue/Introduction

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.

Environment

Release : 8.62

Component : ECLIPSE WEB VIEW

Cause

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.

Resolution

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)

}

 

Additional Information

CA Gen 8.6 > Reference > User Exits > Browser User Exits

CA Gen Web View HTML Control custom button executing Gen designed button does not work (works in Web Generation)