You need to sign in to do that
Don't have an account?

TinyMCE breaks Javascript Insert from Lookup Popup Window
Hi,
For anyone looking into using TinyMCE in a VF page: it breaks the Salesforce functionality for lookup fields to paste a selected value from the lookup popup window.
More specifically the function that occurs when you click a magnifying glass next to a lookup inputField, it launches a popup from which you can search and select a record. If the TinyMCE script is loaded I get this error logged in Firebug:
function onclick(event) {
-paul
For anyone looking into using TinyMCE in a VF page: it breaks the Salesforce functionality for lookup fields to paste a selected value from the lookup popup window.
More specifically the function that occurs when you click a magnifying glass next to a lookup inputField, it launches a popup from which you can search and select a record. If the TinyMCE script is loaded I get this error logged in Firebug:
Permission denied to get property Window.lookupPick
function onclick(event) {
top.window.opener.lookupPick2("thePage:theForm",
"thePage:theForm:mainBlock:theSection:j_id46_lkid", "thePage:theForm:mainBlock:theSection:j_id46", "0037000000c2L04",
"John Doe", "cas4", "Acme products", "cas4_lkid", "0017000000Sxxxx", false);
}
Jeremy
thanks,
-paul
"Simply stated, the SOP states that JavaScript code running on a web page may not interact with any resource not originating from the same web site. The reason this security policy exists is to prevent malicious web coders from creating pages that steal web users' information or compromise their privacy. While very necessary, this policy also has the side effect of making web developers' lives difficult."
It could be that you have some JavaScript loading from an external server that is doing something behind the scenes like creating hidden iframes and attempting cross-frame scripting. Wouldn't surprise me if TinyMCE is doing this since it's pretty advanced.
Edit: Looking at the error message again, "top.window.opener..." indicates cross-frame/window activity. Can you host your TinyMCE files in salesforce? perhaps as documents?
Jeremy
Message Edited by jeremy_ross on 10-22-2008 03:05 PM
See this recent post for an example of using another 3rd party library to see what I mean.
Libraries like Ext.js for example work perfectly fine when referenced from an external server (including Ext's own demo servers) but it usually better just from a versioning and robustness perspective to host your own copy just like you would typically do in a non-PaaS deployment.
Message Edited by dchasman on 10-23-2008 08:02 AM