SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru dale_burrell's Avatar
    Join Date
    Aug 2002
    Location
    Wellington, New Zealand
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    FreeTextBox (FTB) in IFRAME never loads in Firefox.

    Hi,

    Using an the FreeTextBox control inside an IFRAME never completes loading - and as I have some actions to perform once its finished loading this is a real problem.

    The lines of code that are causing the problem are:

    Code:
        this.designEditor.document.open();
        this.designEditor.document.write("<html" + ((this.textDirection == "rtl") ? " dir='rtl'" : "") + ">" +
                "<head>" + 
                ((this.designModeCss != '') ? "<link rel='stylesheet' href='" + this.designModeCss + "' type='text/css' />" : "") + 
                ((this.baseUrl != '') ? "<base href='" + this.baseUrl + "' />" : "") + 
                "</head>" + 
                "<body" + ((this.designModeBodyTagCssClass != '') ? " class='" + this.designModeBodyTagCssClass + "'" : "") + ">" + 
                    this.StoreUrls(this.htmlEditor.value) + 
                "</body>" + 
            "</html>");
    When I step through it in Firebug it seems to step OK - but it stays loading for as long as I have been able to leave it.

    I have no idea why that document.open() line is causing such a problem.

    For now I've made these lines conditional to IE as it doesn't seem have a noticable effect on the operation in Firefox.

    I would love a fix to this if anyone has one - support at the FreeTextBox site is a bit on the sparse side.

    Dale
    If you aren't living life on the edge
    - you're taking up too much space
    Creative Dreaming Ltd / Ask The Local / Amanzi Travel

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,653
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Moved this over to the JavaScript forum where the question is more appropriate.

  3. #3
    SitePoint Guru dale_burrell's Avatar
    Join Date
    Aug 2002
    Location
    Wellington, New Zealand
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Adding this line before the block of code show above solves the problem:

    Code:
     this.designEditor.document.open();this.designEditor.document.close(); // Hack to ensure iframe doc is closed correctly
    Not sure while - likely that the stream wasn't closed properly.
    If you aren't living life on the edge
    - you're taking up too much space
    Creative Dreaming Ltd / Ask The Local / Amanzi Travel


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •