Hey everyone,
I am performing an action in jscript everytime a certain view is chosen. So in the OnSwitchView I have placed an if statement as follows;
if (XDocument.View.Name == "Email Submit")
{
//Perform action
}
My problem is I have tried placing a close() method in this if statement once the action has been completed. However, I always get an error! The code I use for the close is;
XDocument.View.Window.Close(true);
I know the coding for the if statement and close method are correct when used separately, so my question is can a close method not be put into an OnSwitchView event handler?
I'm predicting the answer to this post is going to be a quick and painfull 'no'.