[Catalyst] html::prototype syntax in new Cat version
Will Smith
willbelair at yahoo.com
Wed Jun 27 17:48:33 GMT 2007
Hi,
This might be a pain in the neck to someone but please be patient if you read the mail. I having prob with Html::Prototype with Catalyst. It works like a champ with older version of Cat, but in the current version, the syntax might be a bit changed and I just cannot get it.
I just tried a little test code posting in the Html::Prototype:
On my template:
<% $c->prototype->define_javascript_functions %>
<form action="/bar" method="post" id="baz">
<fieldset>
<legend>Type search terms</legend>
<label for="acomp"><span class="field">Search:</span></label>
<input type="text" name="acomp" id="acomp"/>
<span style="display:none" id="acomp_stat">Searching...</span><br />
</fieldset>
</form>
<span id="acomp_auto_complete"></span><br/>
<% $c->prototype->auto_complete_field( 'acomp', { url => 'chain/autocomplete', indicator => 'acomp_stat' } ) %>
------
and in my controller
sub autocomplete : Global {
my ( $self, $c ) = @_;
my @items = qw/foo bar baz/;
$c->res->body( $c->prototype->auto_complete_result(\@items) );
}
-------
I hope that someone has been using this auto_complete, and observe_field method in Catalyst would help me.
I have read this http://dev.catalystframework.org/wiki/Guides/AJAX/SelectChaining , and also got syntax prob, because it shows no action at all
Thank you for you help and your patience
---------------------------------
Boardwalk for $500? In 2007? Ha!
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070627/96e70e01/attachment.htm
More information about the Catalyst
mailing list