2 <h2>Ajax Support - ObserverField</h2>
\r
5 <div class="container">
\r
7 The ObserverField helper method creates an inline script that
\r
8 start to observe a field for value change in the specified interval.
\r
9 When a change is detected, a remote method is invoked.
\r
15 <div class="container">
\r
18 <li><code>public String ObserveField(String fieldId, int frequency, String url, String idOfElementToBeUpdated, String with)</code></li>
\r
19 <li><code>public String ObserveField(String fieldId, int frequency, String url, IDictionary options)</code></li>
\r
26 <div class="container">
\r
28 <a href="${siteRoot}/code/showCode.castle?file=Views/AjaxArea/observerfield/index.vm">Check this view source code</a>.
\r
31 Zip Code: <input type="text" name="zipcode" id="zipcode">
\r
35 $AjaxHelperOld.ObserveField("zipcode", 2, "AddressFromZip.castle", "address", "'value='+value")
\r
42 <select name="country" id="country">
\r
43 <option selected value="br">BR</option>
\r
44 <option value="uk">UK</option>
\r
45 <option value="us">US</option>
\r
46 <option value="ca">CA</option>
\r
47 <option value="ch">CH</option>
\r
48 <option value="jp">JP</option>
\r
52 <span id="statesplaceholder">
\r
53 <select name="states">
\r
54 <option selected>Select the country first</option>
\r
58 $AjaxHelperOld.ObserveField("country", 2, "GetStatesFromCountry.castle", "statesplaceholder", "'value='+value")
\r