|
Prev: still hoping for a little help!
Next: Appending Events
From: sheldonlg on 5 May 2008 08:55 I have googled for '"Internet Explorer" "Unknown runtime error"' and not found anything useful. I have the following (for simplicity of presentation here): <div><table><tr><th id="foo"></th></tr></table></div> In my javascript I have two lines: var titleObj = document.getElementById('foo'); titleObj.innerHTML = "Name is bar"; IE6 is throwing an "Unknown runtime error" at the second line. What can I do about it?
From: Ugo on 5 May 2008 09:03 > What can I do about it? Mmmm, do you wait for onloading the page?
From: sheldonlg on 5 May 2008 09:07 Ugo wrote: >> What can I do about it? > > Mmmm, do you wait for onloading the page? The page is already loaded. This occurs when clicking a button on the page that brings up the div (making it visible, that is). This line is part of that javascript that presents the box.
From: Ugo on 5 May 2008 09:22 >>> What can I do about it? >> Mmmm, do you wait for onloading the page? > The page is already loaded. This occurs when clicking a button on the > page that brings up the div (making it visible, that is). This line is > part of that javascript that presents the box. You add the text when the table is hidden? and then you make it visible? If it is so, IE could get angry...
From: sheldonlg on 5 May 2008 09:39
Ugo wrote: >>>> What can I do about it? >>> Mmmm, do you wait for onloading the page? >> The page is already loaded. This occurs when clicking a button on the >> page that brings up the div (making it visible, that is). This line is >> part of that javascript that presents the box. > > You add the text when the table is hidden? and then you make it visible? > If it is so, IE could get angry... I create the entire block and have visibility:hidden. In that creation, the innerHTML is "". When I activate the script, a number of things happen. As currently coded, the last list is to set the visibility:visible. Right before that I have the two lines (find the element by ID and set its innerHTML). I will try reversing that order, setting it visible and then changing the innerHTML, and see what happens. |