Re: problem clearing innerhtml on mozilla




RobG wrote:
> ed wrote:
> > Hello-
> >
> > i'm having some problems getting innerhtml to clear on mozilla, but it
> > works fine in ie. my page is setup such that i have a div:
> >
> > <div id="otherModel"></div>
> > on a select from a combo box, in my javascript i execute:
> > div = document.getElementById("otherModel");
> > depending on what's selected in a combobox, i execute:
> > var inner2 = "<p>Other Model:<br />";
> > inner2 = inner2 + "<input type='text' id='otherModel' ";
>
> Here you create a second element with the id 'otherModel', that gives
> you invalid HTML.

that's it, that's rob! i'd been looking at the stooopid code all day
and it'd figure i'd miss something dumb like that!

<snip>
> > an example can be seen here:
> > http://www.atwistedweb.com/blog/index.php?/categories/35-Helmet-Survey.
>
> I looked, but it's messy. I think the above advice will do the trick.

yeah, it's all being dumped into the middle of a blog, so that doesn't
help... thanks for the hints though- it did the trick!

.



Relevant Pages