K
Kevin G.
The javascript code below is attached to a button and it basically launches a
common dialog box for users to browse to. The code errors out when the
ShowOpen() method is called. Here is the error message:
"The common dialog function failed during initialization. This error often
occurs when insufficient memory is available."
Here's the code:
function Link::OnClick(eventObj)
{
var ObjFSO = new ActiveXObject("MSComDlg.CommonDialog");
ObjFSO.Filter = "Samples (*.xml)|*.xml";
ObjFSO.FilterIndex = 0;
ObjFSO.InitDir = "C:\\";
var InitFSO = ObjFSO.ShowOpen();
if (InitFSO != null) {
var link = XDocument.DOM.selectSingleNode("//howtouse/@link")
if (link != null) {
link.text = ObjFSO.FileName;
}
}
}
Anyone know why I get this error? Any help is much appreciated. Thanks.
common dialog box for users to browse to. The code errors out when the
ShowOpen() method is called. Here is the error message:
"The common dialog function failed during initialization. This error often
occurs when insufficient memory is available."
Here's the code:
function Link::OnClick(eventObj)
{
var ObjFSO = new ActiveXObject("MSComDlg.CommonDialog");
ObjFSO.Filter = "Samples (*.xml)|*.xml";
ObjFSO.FilterIndex = 0;
ObjFSO.InitDir = "C:\\";
var InitFSO = ObjFSO.ShowOpen();
if (InitFSO != null) {
var link = XDocument.DOM.selectSingleNode("//howtouse/@link")
if (link != null) {
link.text = ObjFSO.FileName;
}
}
}
Anyone know why I get this error? Any help is much appreciated. Thanks.