Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question changing the innerHTML of a div from within an iframe in Firefox

    I created a page that has an iframe on it. Within this iframe I call an asp page. The asp page is supposed to do some work and then update the innerHTML of a <div> object on the parent page to indicate that processing of the page in the iframe is complete. The code works in IE but not FireFox. I am wondering what is the best way to make the script work for both browsers?

    Sub page JavaScript:
    Code:
    updateParent()
    {
    parent.document.getElementById("num2").innerHTML = '<center><strong>Processing complete.</strong></center>';
    }
    Parent page:

    Code:
    <div id="num2"></div>

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,189
    Thanks
    75
    Thanked 4,341 Times in 4,307 Posts
    Should work. I've certainly done similar stuff for *years*. I used to use hidden frames as a way of doing AJAX-style coding long before AJAX existed.

    Can you show the page live?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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