8.18.2007

ExternalInterface:javaScript injection through ActionScript and Firefox1.5.0.12

I was playing with the powerful javaScript injection through ActionScript/mxml utility developed by Abdul.I have encountered a strange error while using it. I am using this utility for data: URI scheme to show an image inside a popup from flex. I am sending Base64Encoded data to the pop up. It works fine when I send the data to the popup through window.open();

var generator=window.open ("data:image/png;base64,"+imgData, "", "width=" + w + ",height=" + h + ",resizable=1", toolbar="0");
But, when I try to write an image tag inside the popup, it does not work.

generator.document.write("<""img src=" +imgData+ ", height=" +h+ ", width=" +w+ "/>");

It does not show any data in the pop up. It throws the following strange error in my Firefox JavaScript console.

Error:
Error: [Exception... "'Permission denied to get property XULElement.accessKey' when calling method: [nsIDOMXULLabelElement::accessKey]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame

I have posted this bug(?) in flex_india Google group and yet to get the solution.I would really appreciate if any body throws some light one this.

No comments: