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
javascript add option methods.

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,
> Pretty new to javascript and prototype.  Been developing windows software for
> years though.
> At any rate, I have a question and if it's too javascript related and 
> considered
> OT, please let me know and/or direct me to an appropriate group for 
> discussion.
> Assume that I have DIV with several elements such as TextBox, Combo Box, etc 
> and
> 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 
> I
> 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 
> the
> 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,
> Lee
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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to