View Full Version : changing the innerHTML of a div from within an iframe in Firefox

11-09-2010, 06:00 PM
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:

parent.document.getElementById("num2").innerHTML = '<center><strong>Processing complete.</strong></center>';

Parent page:

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

Old Pedant
11-09-2010, 08:43 PM
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?