PDA

View Full Version : how do I check if the user is Canadian


tesscm
07-18-2002, 03:36 PM
How do I check if my user is Canadian? If he or she is in Canada, I have to link to Amazon.Ca, otherwise I link to Amazon.Com,
where they will hopefully order our product.

ecnarongi
07-18-2002, 04:09 PM
I believe there is a server side variable does can track this, you are not going to be able to do this with javascript alone.

Quiet Storm
07-18-2002, 07:50 PM
Found this:

http://javascriptkit.com/script/script2/language.shtml

requestcode
07-18-2002, 07:55 PM
Why not provide two links one for Canada and one for the US and have them click on the link for Canada. Not everyone will have specified the correct language when the browser or operating system was installed and could end up at the wrong site.

tesscm
07-18-2002, 08:18 PM
Thanks for your replies. They were really helpful.

jalarie
07-19-2002, 01:54 PM
:( The link posted by Quiet Storm works for Netscape and Internet Explorer, but fails for Opera and Mozilla. To get it to work, test for IE instead; Internet Explorer is the exception, not Netscape.