<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "jquery autocomplete postalcode"]]></title>
		<link>http://forum.geonames.org/gforum/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "jquery autocomplete postalcode"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>jquery autocomplete postalcode</title>
				<description><![CDATA[ Hi

I use jquery autocomplete and i want to write zipcode in input and city name appear on a second input.

But i don't achieve to keep postalcode on the first input.

<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>
$&#40;function&#40;&#41; {
    function log&#40; message &#41; {
      $&#40; "&lt;div&gt;" &#41;.text&#40; message &#41;.prependTo&#40; "#log" &#41;;
      $&#40; "#log" &#41;.scrollTop&#40; 0 &#41;;
    }
 
    $&#40; "#city" &#41;.autocomplete&#40;{
      source: function&#40; request, response &#41; {
        $.ajax&#40;{
          url: "http://ws.geonames.org/searchJSON?&country=FR",
          dataType: "jsonp",
          data: {
            featureClass: "P",
            style: "full",
            maxRows: 12,
            name_startsWith: request.term
          },
          success: function&#40; data &#41; {
            response&#40; $.map&#40; data.geonames, function&#40; item &#41; {
              return {
                label: item.name,
                value: item.postalCode
              }
            }&#41;&#41;;
          }
        }&#41;;
      },
      minLength: 2,
      select: function&#40; event, ui &#41; {
        log&#40; ui.item ?
          "" + ui.item.label :
          "" + this.value&#41;;
      },
      open: function&#40;&#41; {
        $&#40; this &#41;.removeClass&#40; "ui-corner-all" &#41;.addClass&#40; "ui-corner-top" &#41;;
      },
      close: function&#40;&#41; {
        $&#40; this &#41;.removeClass&#40; "ui-corner-top" &#41;.addClass&#40; "ui-corner-all" &#41;;
      }
    }&#41;;
  }&#41;;</pre>
		</div>

With "value: item.postalCode" i've got city name in both input. If i try item.adminCode3 it works but not postalCode.

I use french city. Somebody know how to do that ?]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/4167.page#12324</guid>
				<link>http://forum.geonames.org/gforum/posts/list/4167.page#12324</link>
				<pubDate><![CDATA[Tue, 16 Apr 2013 06:56:48]]> GMT</pubDate>
				<author><![CDATA[ Hydro]]></author>
			</item>
	</channel>
</rss>