|
Rank: Advanced Member Groups: Member
Joined: 9/4/2007 Posts: 114
|
Today I started getting the following runtime errors when switching to Preview mode in the Editor: Microsoft JScript runtime error: 'document' is null or not an object The line it is pointing to is in e_web.ashx in function _eofed_ee() on the following command:
Code: JavaScript
c.document.write(b);
function _eofed_ee(){var a=this.eo_vt;var b=_eofi_ee();var c=_eofcf_c(this);b="<base href=\""+b+"\" />";c.document.write(b);}
Clicking continue displays the following error: Microsoft JScript runtime error: Object doesn't support this property or method, and points to this line:
Code: JavaScript
_thisFrame.eo_InitHead()
var _thisFrame = window.frameElement; if (_thisFrame && _thisFrame.eo_InitHead) _thisFrame.eo_InitHead();
Any idea what may be the cause of these errors?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We are not sure. Can you check whether c has a value or not? Also does this occur on a certain browser/OS or on all browsers all the time?
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 9/4/2007 Posts: 114
|
c is undefined. Can't test all os/browsers as I am in dev only at this time. Firefox stops running the script when it gets to this line: Editor1.setHtml(html); Is there an alternate syntax for Firefox? The dialog opens in Firefox if I exclude the .setHtml() method call. Here is my javascript code to load html into the editor and open the dialog (works fine in IE):
Code: JavaScript
function GetContentForEditor(labelid) {
CurrentElement = labelid;
currElementHolder = $get('<%= currentElement.ClientID %>');
currElementHolder.value = CurrentElement;
html = document.getElementById(labelid).innerHTML;
Editor1 = eo_GetObject('Editor1');
Editor1.setHtml(html);
eo_GetObject('DialogEditor').show(true);
}
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, For the document is "null" problem, please check the following values in the debugger when the stack frame is inside _eofed_ee: c --> Known, as "null" this.outerHTML --> Please check this.id --> Please check this.contentWindow.location -> Please check The second issue has to do with timing. It appears FireFox won't let you set anything when the editor is not visible. Try to show the dialog first, then use setTimeout to delay your setHtml like this:
Code: JavaScript
eo_GetObject('DialogEditor').show(true);
setTimeout(function()
{
Editor1.setHtml(html);
}, 200);
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 9/4/2007 Posts: 114
|
The SetTimeout() function worked to resolve the Firefox issue with setHtml() method.
However, now it appears that in Firefox, when you select a new image in the editor using the "Edit Image" and "Browse Image" dialogs, the image url is not updated in the resulting Html, even though the editor shows the newly selected image in Design and Preview. If you look at the HTML view, it still shows the old filename. Unless you actually update the the url in HTML view, it will not be updated (in firefox).
(fyi, the c = null problem mysteriously went away, maybe something whack in my dev web server.)
Thanks, Duane
|
|
Rank: Advanced Member Groups: Member
Joined: 9/4/2007 Posts: 114
|
Ok, the error when switching the Editor to Preview returned today. I've stopped the server, rebuilt and run again with the same result:
c.document.write(b)
c = undefined this.outerHTML = undefined this.id = "ctl00_ContentPlaceHolder1_DialogEditor_ctl00_Editor1_iframep" this.contentWindow.location = {http://localhost:53111/eo_web.ashx?id=32d49670-2c71-4c21-821e-a31bc15f2716}
The SetTimeout() function corrected the Html loading issue in Firefox.
However, Firefox still does not update the url when selecting images.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, We are still working on the selecting image issue. We can not explain why you have c as undefined and yet this.contentWindow has a value because they suppose to be the same. The following code returns this.contentWindow to "c" on IE: var c=_eofcf_c(this); If you see it again in the debugger, you may want to step into eofcf_c and see why this.contentWindow has a value, but c does not. The following is _eofcf_c's source code for your reference:
Code: JavaScript
function _eofcf_c(frame)
{
if (frame.contentDocument && //For Gecko based browsers
frame.contentDocument.defaultView &&
browser_is_not_safari)
return frame.contentDocument.defaultView;
else if (frame.contentWindow) //For IE
return frame.contentWindow;
else
...does not apply
}
The code provided is based on the latest version. So you may want to update to the latest version if you have not already done so. Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 9/4/2007 Posts: 114
|
The failed image selecting issue applies to all non-IE browsers: e.g.: Firefox, Safari, Chrome, tested on Vista Business.
I don't see the above referenced function in my debugger, I am installing the new (_70_23) build now. We are currently running 2008.0.63 build.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 9/4/2007 Posts: 114
|
Installing version 7 seems to have resolved the c = undefined issue.
Editor is still not updating the HTML image URL in Firefox, Chrome and Safari, however. Interestingly, the img tag alt, Width and Height attributes are updated.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We have posted a new build that should fix the image Url issue. You can download the new build directly from our download page.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 9/4/2007 Posts: 114
|
Hello,
I have downloaded and installed the new build. It fixed the image url issue for selecting images.
Occasionally when uploading images using Firefox, Safari, Chrome, the upload process appears to not complete sucessfully and the uploaded image is not displayed.
Also, Firefox, Safari and Chrome seem to periodically loose the ColorPicker and text formatting functions when editing markup.
Thanks,
Duane
|
|