Insufficient Memory error

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.
 

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