Why does my call from flash to Javascript fail in IE9?

I have a couple of buttons in my flash application that call two different javascript functions. They work in all browsers except IE9 (I haven't tried earlier IEs). My code to call the function is something like this: ExternalInterface.call( "myLovelyFunction", string1, string2); and the code in the JS looks like this: function myLovelyFunction(string1, string2) { window.open('https://twitter.com/share?url=http%3A%2F%2Fwww.mysite.com%2Fapage.php&via=atwitteraccount&text=Some%20text%22&related=atwitteraccount', 'windowname', 'height=290,width=510'); } In IE9, the function does absolutely nothing, but the console complains with: SCRIPT438: Object doesn't support property or method 'SetReturnValue' index.php, line 1 character 1 line 1, character 1 is obviously pointing at nothing in particular. I can make it work fine by switching on compatability view, although the console error doesn't go away. Is there anything about IE9 that causes this, and more importantly, how do I fix this?

以上就是Why does my call from flash to Javascript fail in IE9?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准