fbpx
Skip to content
Questions & AnswersCategory: Questionsexecuting the javascript then redirecting
atiliminc asked 7 years ago
hi, I have a landing page:  richard-tse.squarespace.com.   I would like the language buttons to execute the javascript:languageClicked(x); after being clicked, but afterwards automatically go to the home page of the site (a different page). Right now the language buttons do change the language on this landing page, but I don't know how to get them to subsequently jump to my main homepage (slug is /home) Can you tell me how to do this?   Thanks, Rich  
1 Answers
Dave Hilditch Staff answered 6 years ago

There are two options for this as detailed on the support page.
Either use:

javascript:changeLanguageAndMove(0, '/');

or use a URL like this:
https://www.yourdomain.com/your-url/?lang=fr

We use cookies

We use cookies for various things on our site, including our on-site chat bubble (if you use it), our comment forms (if you use them) and for session handling (if you log in).

Other than that, we use cookies to identify where traffic came from to help us understand which traffic turns into sales, we use a cookie for Google Analytics traffic analysis and we use a cookie to customise adverts for our own products we think you'll be interested in.

You can read more detail in our privacy policy page. Please click 'Accept' or 'Decline' to continue.