S
sunflower
I'm trying to switch view depending on the attribute of the XML document
being passed to InfoPath.
The name of the view is stored as an attribute (openView) on the root node.
I have the following code in the OnLoad event.
function XDocument::OnLoad(eventObj)
{
var rootNode = XDocument.DOM.selectSingleNode("/my:myFields");
var openView = rootNode.getAttribute("mypenView");
XDocument.View.SwitchView(openView);
}
The variable openView is being read correctly but the SwitchView is not
working.
Anyone with any bright ideas why? I suspect that the view is not available
in the onLoad event. If not, where else can I have it?
Thanks
being passed to InfoPath.
The name of the view is stored as an attribute (openView) on the root node.
I have the following code in the OnLoad event.
function XDocument::OnLoad(eventObj)
{
var rootNode = XDocument.DOM.selectSingleNode("/my:myFields");
var openView = rootNode.getAttribute("mypenView");
XDocument.View.SwitchView(openView);
}
The variable openView is being read correctly but the SwitchView is not
working.
Anyone with any bright ideas why? I suspect that the view is not available
in the onLoad event. If not, where else can I have it?
Thanks