Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4092590
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T19:30:38+00:00 2026-05-20T19:30:38+00:00

Completely restated my question: Problem: Losing reference to an iFrame with Mozilla firefox 3.6

  • 0

Completely restated my question:

Problem: Losing reference to an iFrame with Mozilla firefox 3.6 and 4.0

More info:
– Works fine in internet explorer 8 64-bit and 32-bit version.

How to reproduce? In Mozilla: Open the editor accordion menu. Click the ‘editor openen’ link, in the editor fill in some random text, then click ‘bestand opslaan’. Fill in a name and click on ‘save’. The content of the editor will be downloaded in HTML format.

Close the save file dialog box by clickin outside of it or on the specified buttons. Click on the ‘bestand opslaan’ button again and try to save your content to a file. You’ll see nothing happening.

The problem isn’t there in IE8. Try opening it in there.

Firebug tells me this the second time you open the save dialog:

iFrame.document is null

Example Link: http://www.newsletter.c-tz.nl/

More info:
– switched from thickbox to colorbox to try and resolve this issue and because thickbox isn’t supported for a long time now.
– colorbox gives me the same problem so I don’t think it is this.
– tried googling for iframe reference error and like, found nothing.
– tried putting the iframe code outside of the div that is called by the colorbox script, it retains it reference but not when I put it back inside that div.

Thanks to: JohnP who offered to open a ‘hunt’ on this.

Edit:

I thought maybe the saveFile.php file was causing trouble to the parent of the iframe but after removing it from the action variable in the editor.php script it still fails with the same error after you open the dialog for a second time.

Can someone maybe write a script that iterates through iframes by name and when the rignt iframe is found reference it to a var? I want to try it but don’t know how..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T19:30:39+00:00Added an answer on May 20, 2026 at 7:30 pm

    I can’t explain why it’s work the first time for Firefox, but in Firefox the function to used for get iframe is different of IE : How to get the body's content of an iframe in Javascript?.

    So, replace your JavaScript function “saveToFile” to this :

    function saveToFile() {
        var saveAsFileName = document.getElementById('saveAs_filename').value;
        var currentContent = tinyMCE.editors["editor_textarea"].getContent();
        var editorFileName = document.getElementById('editor_filename');
    
        var iFrameTag =  document.getElementById('saveAs_Iframe');
        var iFrame;
        if ( iFrameTag.contentDocument ) 
        { // FF
            iFrame = iFrameTag.contentDocument;
        }
        else if ( iFrame.contentWindow ) 
        { // IE
            iFrame = iFrameTag.contentWindow.document;
        }
    
        var inframeEditorFileName = iFrame.getElementById('editor_filename');
        var inframeEditorContent = iFrame.getElementById('editor_textarea');
    
        editorFileName.value = saveAsFileName;
        inframeEditorFileName.value = saveAsFileName;
        inframeEditorContent.value = currentContent;
    
        iFrame.editor_self.submit();
    }
    

    I replace the function with Firebug and it’s works for me.

    Update :
    You can also used a crossbrowser solution, more simple, thanks to jQuery :

    function saveToFile() {
        var saveAsFileName = document.getElementById('saveAs_filename').value;
        var currentContent = tinyMCE.editors["editor_textarea"].getContent();
        var editorFileName = document.getElementById('editor_filename');
        editorFileName.value = saveAsFileName;
    
        $("#saveAs_Iframe").contents().find("#editor_filename").val(saveAsFileName)
        $("#saveAs_Iframe").contents().find("#editor_textarea").val(currentContent)
        $("#saveAs_Iframe").contents().find("form[name=editor_self]").submit();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting a weird problem when refreshing my ListView , it works fine until
I've never been completely happy with the way exception handling works, there's a lot
I've almost completely installed Boost, but I have a problem with how to set
I completely understand the concept of expression trees, but I am having a hard
Is it completely against the Java way to create struct like objects? class SomeData1
I haven't completely understood, how to use sigprocmask() . Particularly, how the set and
I am completely new to ruby and I inherited a ruby system for a
I want completely automated integration testing for a Maven project. The integration tests require
I'm completely new to AIR but what I'm trying to do feels like it
I'm not completely sure I understand the workflow way of doing things, but if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.