Basically you can't do it onAfterChange. Read more on why here:
http://www.infopathdev.com/howto/tips/default.aspx?i=a71e3465487b46f0b11ae5a63eda8269
Instead you might want to use a button to "evaluate" the change and run the
OnClick script which would permit this.
>I want to switch to another view when a drop-down select changed, but got
>error below:
[quoted text clipped - 12 lines]
> XDocument.View.SwitchView('Software Request');
>}
Kenneth - 17 Aug 2005 09:57 GMT
Thank you Anton.
> Basically you can't do it onAfterChange. Read more on why here:
> http://www.infopathdev.com/howto/tips/default.aspx?i=a71e3465487b46f0b11ae5a63eda8269
[quoted text clipped - 18 lines]
> > XDocument.View.SwitchView('Software Request');
> >}