(Quick Reference)
In order to use the tags, you need need to install the jquery plugin.
addressLookupOnChange
Purpose
Creates a jQuery initialization script that adds onchange triggers to address form fields on the page that automatically lookup the address.
This tag needs to go inside the
<head>
element in the GSP page.
Examples
Automatically lookup the default form fields.
<g:setProvider library="jquery"/>
<html>
<head>
<title>Some Page</title>
<g:javascript library="jquery"/>
<script type="text/javascript" src="${resource(file:'address-lookup-zp4.js', dir:'js', plugin:'address-lookup-zpfour')}" />
<g:addressLookupOnChange />
</head>
<body>...</body>
</html>
Automatically lookup non-default form fields.
…
<g:addressLookupOnChange address="addressIn" city="cityIn"
state="stateIn" zipCode="zipCodeIn" addressOut="z1Address"
cityOut="z1City" stateOut="z1State"
zipCodeOut="z1ZipCode" zipFourOut="z1ZipFour"
errorsOut="errorsOut" certifiedOut="certifiedOut" />
...
Description
Attributes
address
(optional) - the input field name for the address line, the default is address
city
(optional) - the input field name for the city, the default is city
state
(optional) - the input field name for the state, the default is state
zipCode
(optional) - the input field name for the zip code, the default is zipCode
addressOut
(optional) - the output field name or element id for the address line, the default is address
cityOut
(optional) - the output field name or element id for the city, the default is city
stateOut
(optional) - the output field name or element id for the state, the default is state
zipCodeOut
(optional) - the output field name or element id for the zip code, the default is zipCode
zipFourOut
(optional) - the output field name or element id for the plus four zipcode, the default is zip4
certifiedOut
(optional) - the output field name or element id for the certified result, the default is certifiedOut
errorsOut
(optional) - the output element id for the error message, the default is errorsOut
allowAddressLookup
(optional) - the checkbox field name to enable/disable the lookup javascript