I'm in the process of converting the following VBScript code to JavaScript:
Sub GxUIProxyVB_OnLogon
Dim EntityProxy
For Each EntityProxy In GxUIProxyVB.ListEntityProxy
MsgBox EntityProxy.Name
Next
End Sub
This code is an event handler for a post-logon event of an ActiveX control that is embedded in a web page running in Internet Explorer 8. This code runs when a user successfully logs on via the ActiveX control's logon mechanism.
In the script, GxUIProxyVB refers to the ActiveX control object embedded in the DOM using an HTML element.
Here is the JavaScript version I have so far:
function GxUIProxyVB::OnLogon()
{
var EntityProxy;
// For Each EntityProxy In GxUIProxyVB.ListEntityProxy
// alert(EntityProxy.Name);
// Next
}
I am struggling with the part where I need to enumerate the values of GxUIProxyVB.ListEntityProxy.
This screenshot from IE8's watch list displays the members of the ListEntityProxy object.
Although I could keep the code in VBScript since users will likely be using Internet Explorer to access this content, I prefer having it in JavaScript for easier code maintainability in the future. (I want future developers working on this project to be proficient in JavaScript rather than VBScript.)