Hi,
I'm having problem debugging this error that is being thrown in Internet Explorer.
--------------------------- Error --------------------------- A Runtime Error has occurred. Do you wish to Debug? Line: 209 Error: Permission denied --------------------------- Yes No ---------------------------
When I choose to debug it throws me to the FCKEvents.prototype.FireEvent method in fckevents.js to the line where the program flow has entered the catch block and the -2146823277 error has been thrown. I see that the comment over that if statement says that this error should be ignored. There are no other problems with application, just that error dialog is thrown and if I say no to the offer to debug the program continues as I'd expect. I don't know if this is a problem with my code - maybe in a non development environment this dialog would not appear? I include some of my code below, if anyone can enlighten me I'd be delighted.
Plugin Code
var OpenFileCommand=function(){}; OpenFileCommand.prototype.Execute=function(){ } OpenFileCommand.GetState=function() { return FCK_TRISTATE_OFF; //we dont want the button to be toggled } OpenFileCommand.Execute=function() {} FCKCommands.RegisterCommand( 'OpenFile', new FCKDialogCommand('OpenFile',FCKLang.OpenFileBtn, FCKPlugins.Items['RealiseIT'].Path+'OpenFile.htm',400,200,null,null,true) ) ; var oOpenFileItem = new FCKToolbarButton( 'OpenFile', FCKLang.OpenFileBtn, null, FCK_TOOLBARITEM_ONLYICON, false, false, FCKPlugins.Items['RealiseIT'].Path + 'images/OpenFile.gif' ); FCKToolbarItems.RegisterItem( 'OpenFile', oOpenFileItem ) ;
OpenFile.htm Javascript Code
function Ok() { if(confirm('You will lose any unsaved changes if you continue.')) { //Load the specified file var fileName = GetE('txtUrl').value; var s = ""; objXml = new ActiveXObject("Microsoft.XMLHTTP"); var trimRe = /\/FCKEditorTest2\/(.*)/; var trimmedFileName = fileName.replace(trimRe, "$1"); var resolvedFileName = "../../../../../"+trimmedFileName; objXml.open("GET", resolvedFileName, false); objXml.onreadystatechange=function() { if (objXml.readyState==4) { s = objXml.responseText; } } objXml.send(null); //Clear the XML file FCK.XMLDoc.removeChild(FCK.XMLDoc.firstChild); var top = FCK.XMLDoc.createElement('RealiseIT'); FCK.XMLDoc.appendChild(top); //Extract XML from the file /*Regular expression to extract comments*/var re= /<!--\s*(<RealiseIT>[\S\s]*?<\/RealiseIT>)\s*-->/g; s = s.replace(re, function(m) {return extractXML(arguments)} ); //Get the substitutions var axGenerated = FCK.XMLDoc.getElementsByTagName('Generated'); for(var i = 0 ; i < axGenerated.length; i++) { if(axGenerated[i].parentNode.parentNode.nodeName == 'RealiseIT') { var axValue = axGenerated[i].getElementsByTagName('Value'); for(var j = 0 ; j < axValue.length ; j++) { var sType = axValue[j].getElementsByTagName('Type')[0].text; var axName = axValue[j].getElementsByTagName('Name'); for(var k = 0 ; k < axName.length ; k++) { var sName = axName[i].text; FCK.ToolbarSet.ToolbarItems.GetItem('SubstitutionCombo')._Combo.AddItem( "id = "+sName, sName+" : "+sType, // sName); } } } } debugger; //Set the XML hidden field window.parent.parent.document.getElementById('RealiseITXML').value = '<!--'+FCK.XMLDoc.xml+'-->'; //Set & Exit FCK.Focus(); //Add styles var styleInsertRE = /(<head>)([\S\s]*?)(<\/head>)/g; s = s.replace(styleInsertRE, '$1<link type="text/css" rel="stylesheet" href="CCKFStyles.css" />$2$3'); FCK.SetHTML(s); return true; } }