Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

Iframe content disappear if script loaded from string

  • 2 件の返信
  • 2 人がこの問題に困っています
  • 1 回表示
  • 最後の返信者: Lehych

more options

I've got strange behaviour of FireFox 3.6-14 (have no 3.0 for now) with whis sample of code http://pastebin.com/CzzfB709 Short explanation: if we create SCRIPT element and push script text from string and at the same time this script (that comes from string) create IFRAME, then iframe content is reloaded after script finished; In sample code you can see that we have `scriptText` variable that contains JS code. Then we create SCRIPT tag and put string code there. What you see: till you not close alert windows, you see text in iframe, but when you close it, iframe became blank.

I also have an example of the same code from string if it pasted directly into HTML. Everything seems fine there. http://pastebin.com/4JcajiDQ

I ask if anyone can just explain me, why is it hapend.

I've got strange behaviour of FireFox 3.6-14 (have no 3.0 for now) with whis sample of code http://pastebin.com/CzzfB709 Short explanation: if we create SCRIPT element and push script text from string and at the same time this script (that comes from string) create IFRAME, then iframe content is reloaded after script finished; In sample code you can see that we have `scriptText` variable that contains JS code. Then we create SCRIPT tag and put string code there. What you see: till you not close alert windows, you see text in iframe, but when you close it, iframe became blank. I also have an example of the same code from string if it pasted directly into HTML. Everything seems fine there. http://pastebin.com/4JcajiDQ I ask if anyone can just explain me, why is it hapend.

すべての返信 (2)

more options

Although you haven't yet received a response on the mozillaZine web development forum, I do think that is a better board for this discussion.

Iframe content disappear if script loaded from string - mozillaZine Forums

more options

As I think, this is some kind of a problem inside FireFox. So I just didn't know where to post it. Usually I'll prefer developer discussion group or maillist but I could not find such for FireFox. If you shure that mozillaZine is a best place for it than I'll wait. But I'm not shure whether it is still active community based on it's main page.