I would reccomend using the dom to be *safe*. For instance, in a
select box if you just try to add "<option>" tags into the "<select>"
container IE will not detect the new elements. you should use the
In general both methods work, but i find using JS is sometimes safer.
I guess in general if its really small nothing is easier and faster
than assigning what you want to an elements.innerHTML. and in more
complex or sensitive cases it can depend.
On Feb 24, 1:48 pm, Lee Jenkins <l...@datatrakpos.com> wrote:
> Hi all,
> years though.
> OT, please let me know and/or direct me to an appropriate group for
> Assume that I have DIV with several elements such as TextBox, Combo Box, etc
> I want to update one specific widget within the DIV, would you recommend
> updating the widget through the DOM or replacing it's markup? Either way, the
> data would be coming in the response of an AJAX request. Seems to me that if
> wanted to juse replace it's markup, I would have to site the elements within
> DIV's themselves.
> If the DIV has several controls on it, I'd prefer not to have to re-display
> entire contents with an innerHTML call, but I am unsure of the best way to
> update a single widget contained within another element like a DIV.
> Thanks for advise,
> Warm Regards,
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to firstname.lastname@example.org
To unsubscribe from this group, send email to
For more options, visit this group at