Web Wiz - Solar Powered Eco Web Hosting

  New Posts New Posts RSS Feed - Permission denied to access property 'command'
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Permission denied to access property 'command'

 Post Reply Post Reply
Author
BobStein View Drop Down
Newbie
Newbie


Joined: 27 June 2011
Location: Lyme, NH
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobStein Quote  Post ReplyReply Direct Link To This Post Topic: Permission denied to access property 'command'
    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.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.07
Copyright ©2001-2024 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Policy

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2024 Web Wiz Ltd. All rights reserved.