Open nicoulaj opened 13 years ago
Even I have problem getting the callFrameFunction to work with the latest library flex-iframe-1.5. Is there any workaround? Do we need the JavaScript functions to be in any particular format(e.g document.showAlert = function () ) ? Do we have any update on this issue?
Hey, This issue also affects iframeInstance.historyBack and iframeInstance.historyForward correct? I can´t seem to get them working with 1.5 IE 9 and Chrome. Do they work with 1.4.6?
just checked. javascript functions in 1.4.6 don't work. all ok 1.4.5
I used the source code for CALLIFRAMEFUNCTION from version 1.4.5 and all works ok
public static var INSERT_FUNCTION_CALLIFRAMEFUNCTION:String = "document.insertScript = function ()" + "{ " + "if (document." + FUNCTION_CALLIFRAMEFUNCTION + "==null)" + "{" + FUNCTION_CALLIFRAMEFUNCTION + " = function (iframeID, functionName, args)" + "{" + "var iframeRef=document.getElementById(iframeID);" + "var iframeDoc;" + "if (iframeRef.contentDocument) {" + "iframeDoc = iframeRef.contentDocument;" + "} else if (iframeRef.contentWindow) {" + "iframeDoc = iframeRef.contentWindow.document;" + "} else if (iframeRef.document) {" + "iframeDoc = iframeRef.document;" + "}" + "if (iframeDoc.wrappedJSObject != undefined) {" + "iframeDoc = iframeDoc.wrappedJSObject;" + "}" + "return iframeDocfunctionName;" + "}" + "}" + "}";
Originally filed by OoOfree...@gmail.com on 2011-03-22T09:37:52
I have tried all the ways I could find, the function callIFrameFunction() just can't work.For example, http://code.google.com/p/flex-iframe/source/browse/#svn/trunk/examples/CallIFrameFunction .This example also can't work. No mater the brower is IE or Firefox. Could anyone give some advance? Thank you very much!