olivier Hericord
2005-Jul-31 12:29 UTC
possible to replace a div (not just its content) with ajax helpers?
hi, is it possible to replace a <div> with ajax? (not just the div copntent but the div anchor itself) thanks?
Steve Downey
2005-Jul-31 14:09 UTC
Re: possible to replace a div (not just its content) with ajax helpers?
olivier Hericord <olivier.hericord.lists@...> writes:> > hi, > > is it possible to replace a <div> with ajax? (not just the div > copntent but the div anchor itself) > > thanks? >How about nesting the <div> to be replaced within another <div>, and then replacing the content of the outer <div>?
Rick Olson
2005-Jul-31 14:13 UTC
Re: possible to replace a div (not just its content) with ajax helpers?
On 7/31/05, olivier Hericord <olivier.hericord.lists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> hi, > > is it possible to replace a <div> with ajax? (not just the div > copntent but the div anchor itself)By manipulating the DOM, sure. You can probably use document.replaceChild to do the deed: http://devguru.com/Technologies/xmldom/quickref/node_replaceChild.html I don''t believe rails has a helper or anything to accomplish this, however. You''ll probably have to do some custom coding with the ajax callbacks. -- rick http://techno-weenie.net