[Catalyst] AJAXPrototype Questions

Yuval Kogman nothingmuch at woobling.org
Thu Sep 8 20:13:59 CEST 2005


One more thing is the insertions - you can replace an element's
contents, replace an entire element, insert an element before or
after another, etc:

	<!-- here -->
	<div id="foo">
	[% c.prototype.link_to_remote(
		"moose"
		{
			update => "foo",
			position => "Before",
		
			url => base _ ..., # we reall ought to have a macro for URLS in V::TT
			# for example
			# url => link(
			#     controller => "Moose",
			#     action => "the_method",
			#     # other useful options here
			# ),
		}
	%]
	</div>

this will result in the result fo the URL fetch being inserted right  after the <!-- here -->.

A nice way to view the effects is the DOM viewer in safari - if you
click a node it's dumped as HTML - but this is *after* the JS code
modified all the DOM elements, so it's very useful.

The aforementioned wiki:

http://wiki.script.aculo.us/scriptaculous/show/Prototypeb

-- 
 ()  Yuval Kogman <nothingmuch at woobling.org> 0xEBD27418  perl hacker &
 /\  kung foo master: /me does not drink tibetian laxative tea: neeyah!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20050908/27b89bb2/attachment.pgp


More information about the Catalyst mailing list