[Catalyst] html::prototype
Will Smith
willbelair at yahoo.com
Fri Mar 23 19:20:39 GMT 2007
Hi,
I get into a syntax error with the "observe_field" funtion, eventhough I think it is very basic, I could not get it right. I think the error is at the "url" value, the "observe_field" cannot call the right funtion in the controller or even does not know what it is. Please help me get it right.
On the template I have :
<select id="selectCountry">
<option>[ Select Country ]</option>
<option value="1">China</option>
<option value="2">Germany</option>
<option value="3">United Kingdom</option>
</select>
<div id="selectCity0">
<select id="selectCity">
<option>[ Select Country First ]</option>
</select>
</div>
[% c.prototype.observe_field('selectCountry',{
url => '/myApp/selectchain/city',
with => "'country='+document.getElementById('selectCountry').value",
update => 'selectCity0',
}) %]
-----------
Thank you
---------------------------------
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070323/089e9554/attachment.htm
More information about the Catalyst
mailing list