I use the Validation plugin (http://bassistance.de/jquery-plugins/
jquery-plugin-validation/)

frmzip: {
        required: true,
        digits: true,
        remote: zip.php,
        },

and the zip.php just return true if the zip exists.. but you do i make
it paste the city into the city input?

On Feb 24, 1:23 am, SteelRing <steelr...@gmail.com> wrote:
> assuming you're using something like .ajax() or .get() just use the
> callback function to distinguish the return value with some if
> statements. Say if the return value is "invalid" from your "remote"
> then dont do it, but otherwise $("#cityplace").text(thereturnedcity);
>
> On Feb 23, 5:53 pm, Gelegrodan <gelegro...@gmail.com> wrote:
>
> > Hello
> > I have two fields; zip and city, i validate zip with remote and it
> > checks against a list if the zip is valid, but i want it too:
> > check if the zip is valid
> > return true if it is valid AND return the city of the zip and paste it
> > in the city-input...
> > How to?
>
> > Of couse i have a databas/array/list with all zip and city's

Reply via email to