Print Page | Close Window

Permission denied to access property 'command'

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=29459
Printed Date: 28 March 2026 at 11:57am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Permission denied to access property 'command'
Posted By: BobStein
Subject: Permission denied to access property 'command'
Date Posted: 27 June 2011 at 3:22am
In the JavaScript Console for Firefox 5 (Tools | Error Console) I was seeing this error message:

Error: Permission denied to access property 'command'
Source File: http://asp.mebito.com/RTE/RTE_javascript.asp?textArea=bigtextarea
Line: 135

I believe this is because I was embedding the RTE in an < iframe > on a different domain.  (This is part of my elaborate scheme to use RTE on a non-IIS web server.)  Access to parent.command was triggering a security breach.  Best I can figure from the .ASP code, parent.command was being used by the Web Wiz Wizards as a kind of global variable.  The subject error would happen any time I'd use any of these features:

  • Format
  • Font
  • Size
  • Text Colour
  • Background Colour

which were otherwise unresponsive.  I seem to have fixed this by guessing that a different global variable scheme would work.  So I made the following changes:

/RTE/RTE_javascript.asp circa line 251:
old: parent.command = command;
new: window.GlobalCommand = command;

/RTE/RTE_javascript.asp circa line 432:
old: editor.contentWindow.document.execCommand(parent.command, false, selection);
new: editor.contentWindow.document.execCommand(window.GlobalCommand, false, selection);

Not sure this doesn't break something else, but it got the above five features to work.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net