By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,245 Members | 1,103 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,245 IT Pros & Developers. It's quick & easy.

international address form

P: n/a
Does anyone know of any application (AJAX or other) that will display
the appropriate address for for the selected (or detected) country?

If not, does anyone know where I can find a list or database of address
formats, so that I can make a collection of xml files (or php and/or
javascript classes) that represent the address format for each country,
so that I can display the correct form elements for a user's own country?

I'd really like an AJAX app that does this, and if there are none, I'd
be willing to make one - I just need to know what elements go with what
countries (and any other considerations).

Some information about how best to store this in a database - or other
international information for similar apps (like phone number formats -
I haven't done any searching for that one yet) would be appreciated too.

Thanks,

Kevin N.
Nov 23 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"Kevin Newman" <Ca******@unFocus.com> skrev i meddelandet
news:Fk******************@news-wrt-01.rdc-nyc.rr.com...
Does anyone know of any application (AJAX or other) that will display
the appropriate address for for the selected (or detected) country?

<snip>

What do you mean, "address formats"?

In my country (Sweden) an address might be:
[Street = a string, sometimes of several words] [number, or number:number]
[optional floor information]
or
[Location: a string]
or
[Main location]
[Sublocation]
or
[P.O. Box...]
or
[just the zip code]
or...

The phone number might be anything from five to eight digits, with a prefix
of anything from two to four digits.

So, how enforce such vague rules? And why? Better to leave, say, five lines
for the user to write an address as (s)he sees fit.

--
Joakim Braun
Nov 23 '05 #2

P: n/a
Joakim Braun wrote:
"Kevin Newman" <Ca******@unFocus.com> skrev i meddelandet
news:Fk******************@news-wrt-01.rdc-nyc.rr.com...
Does anyone know of any application (AJAX or other) that will display
the appropriate address for for the selected (or detected) country? <snip>

What do you mean, "address formats"?

In my country (Sweden) an address might be:
[Street = a string, sometimes of several words] [number, or number:number]
[optional floor information]
or
[Location: a string]
or
[Main location]
[Sublocation]
or
[P.O. Box...]
or
[just the zip code]
or...

The phone number might be anything from five to eight digits, with a prefix
of anything from two to four digits.

I have thought about just leaving a textarea box, and leaving it more
free form. What I'm really looking for, I guess, is a way to normalize
the address data - especially the parts that credit card companies
frequently request like street number and zip code (or it's foreign
equivalent).

There are other possible uses for this that would require more granular
address information (maybe not though) like geolocation, or stats tracking.

Also, there are the soft benefits, like the perception that the user
gets - if I go to a site that doesn't have a standard looking text box
layout for the address when I'm ordering something, it would make me
nervous, and I suspect it would do the same for end users. So I would
like to be able to present a set of form elements that track to the end
users' native address format (or phone).

So, how enforce such vague rules? And why? Better to leave, say, five lines for the user to write an address as (s)he sees fit.


Yeah, that's a consideration - I'd be willing to settle for a reasonable
amount of normalization, if that's even possible.

I was thinking there could be a number of fields - maybe 3 address lines
(maybe even one labeled PO Box), a city field, state/province/whatever,
zip/postal code, and maybe other ones for extended info like town or
county. Obviously these are all US centered, but that's exactly the
problem I'm having, is how to fit other countries' address info into
this structure (or should I even separate the address out like that that?).

So to kind of redefine what I'm looking for; a superset of address
fields that could be sub-set to represent individual country addresses.

An xml file for each country (and forms) would then define which fields
to display, and what the labels are (this leads to a question of what
language to display the labels in I suppose.)

Kevin N.
Nov 23 '05 #3

P: n/a
Kevin Newman wrote:
Joakim Braun wrote:
"Kevin Newman" <Ca******@unFocus.com> skrev i meddelandet
news:Fk******************@news-wrt-01.rdc-nyc.rr.com...
Does anyone know of any application (AJAX or other) that will display
the appropriate address for for the selected (or detected) country? <snip>

What do you mean, "address formats"? [...] > So, how enforce such vague rules? And why? Better to leave, say, five

lines
> for the user to write an address as (s)he sees fit.
>


Yeah, that's a consideration - I'd be willing to settle for a reasonable
amount of normalization, if that's even possible.


There is an interesting resource here:

<URL:http://www.columbia.edu/kermit/postal.html>

I was thinking there could be a number of fields - maybe 3 address lines
(maybe even one labeled PO Box), a city field, state/province/whatever,
zip/postal code, and maybe other ones for extended info like town or
county. Obviously these are all US centered, but that's exactly the
problem I'm having, is how to fit other countries' address info into
this structure (or should I even separate the address out like that that?).

So to kind of redefine what I'm looking for; a superset of address
fields that could be sub-set to represent individual country addresses.

An xml file for each country (and forms) would then define which fields
to display, and what the labels are (this leads to a question of what
language to display the labels in I suppose.)


I think your intentions are good, however practicality dictates that you
will only please some of the people some of the time. Often individual
states/provinces/whatever can't get consistent postal addresses
internally, much less at a national/federal level. The introduction of
post/zip codes was a huge step forward - country plus post code should
get mail within a few kilometres of an address nearly anywhere in the world.

The best idea may be to suggest unit & number, street & number,
locality, city, state, post code & country, but don't rigorously enforce
it and leave room for things like building names or rural address like
'Alvie via Colac'.

BTW, this isn't really a JavaScript question - you may get a better
response in an XML or similar group where such issues are more likely to
be on topic.

--
Rob
Nov 23 '05 #4

P: n/a
RobG wrote:
Kevin Newman wrote:
Joakim Braun wrote:
"Kevin Newman" <Ca******@unFocus.com> skrev i meddelandet
news:Fk******************@news-wrt-01.rdc-nyc.rr.com...
Does anyone know of any application (AJAX or other) that will display
the appropriate address for for the selected (or detected) country?
<snip>

What do you mean, "address formats"? [...] > So, how enforce such vague rules? And why? Better to leave, say, five lines
> for the user to write an address as (s)he sees fit.
>


Yeah, that's a consideration - I'd be willing to settle for a
reasonable amount of normalization, if that's even possible.


There is an interesting resource here:

<URL:http://www.columbia.edu/kermit/postal.html>


Thanks for the link.

I was thinking there could be a number of fields - maybe 3 address
lines (maybe even one labeled PO Box), a city field,
state/province/whatever, zip/postal code, and maybe other ones for
extended info like town or county. Obviously these are all US
centered, but that's exactly the problem I'm having, is how to fit
other countries' address info into this structure (or should I even
separate the address out like that that?).

So to kind of redefine what I'm looking for; a superset of address
fields that could be sub-set to represent individual country addresses.

An xml file for each country (and forms) would then define which
fields to display, and what the labels are (this leads to a question
of what language to display the labels in I suppose.)


I think your intentions are good, however practicality dictates that you
will only please some of the people some of the time. Often individual
states/provinces/whatever can't get consistent postal addresses
internally, much less at a national/federal level. The introduction of
post/zip codes was a huge step forward - country plus post code should
get mail within a few kilometres of an address nearly anywhere in the
world.

The best idea may be to suggest unit & number, street & number,
locality, city, state, post code & country, but don't rigorously enforce
it and leave room for things like building names or rural address like
'Alvie via Colac'.

BTW, this isn't really a JavaScript question - you may get a better
response in an XML or similar group where such issues are more likely to
be on topic.


Yeah, I guess you are right. I guess I was hoping that someone had
solved this problem already, but judging by what you (and others) have
said, I can see why it hasn't really.

Thanks,

Kevin N.
Nov 23 '05 #5

P: n/a
On 2005-11-17, Kevin Newman <Ca******@unFocus.com> wrote:
Does anyone know of any application (AJAX or other) that will display
the appropriate address for for the selected (or detected) country?

If not, does anyone know where I can find a list or database of address
formats, so that I can make a collection of xml files (or php and/or
javascript classes) that represent the address format for each country,
so that I can display the correct form elements for a user's own country?
sometimes address formats vary from region to region or by context...

about all you can rely on is the tast part will identify a distribution
centre from which the mail is distributed.
I'd really like an AJAX app that does this, and if there are none, I'd
be willing to make one - I just need to know what elements go with what
countries (and any other considerations). Some information about how best to store this in a database - or other
international information for similar apps (like phone number formats -
I haven't done any searching for that one yet) would be appreciated too.
allowing freeform data is probably best. otherwise it will be a pig to
maintain, some places have phone numbers of varying length,

USA is running out of phone numbers and will in the near future end up
adding a digit somwhere...


Thanks,

Kevin N.

--

Bye.
Jasen
Nov 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.