Insufficient memory when calling ShowOpen() from a open dialog box

K

Kevin G.

The javascript code below is attached to a button and it launches a open
dialog box. I get the error when the ShowOpen() is called. 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;
}
}
}

Here's the error message:

The common dialog function failed during initialization. This error often
occurs when insufficient memory is available.

Anyone know how to resolve this error? Any help is much appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top