Hi there, I would like to know how to get the browser url in order to send the browser to contact page in english or spanish. I write some code is AS3 so I write a Pseudo JS code cause Im tottally lost, I really would like some hints on this one.
Heres the thing, if you are surfing my site you will be surfing in english or in spanish, like this:
I would like to shorten the adress till the final "/" backwards,
I mean, I need to know if the person is surfing in english or spanish, so they can go to their proper language contact form.
Well, it can be done, but it would be a lot of work. What would be better than getting the URL (which can be accessed with document.URL) and looking for either "en" or "es", would be to use a cookie that defaults to one or the other, give the user a link that will switch back and forth between the two, and every time that link is clicked set the value of the cookie to that language.
do something like If(window.location.href.indexOf("siteA") > -1){//send to formA}
etc
1. If you reply to my post, and your reply would then appear directly beneath my post, DON'T QUOTE MY ENTIRE POST!!! IT'S REDUNTANT!!! IT'S ASININE!!!! IT'S REDUNDANTLY ASININE!!!!! DON'T DO IT!!!!
2. jQuery extends the functionality of JavaScript. If you don't know JavaScript, give up on that jQuery script and learn JavaScript. You'll save yourself a lot of frustration, I promise.
3. Use the [code][/code] tags. Otherwise, you may be left wondering why no one responded to your eyesore of a thread.
Bookmarks