Your DOM updates won't be sticky, but "to reload the page" you can
window.location.reload().

Of course, you seem to be headed in a cleaner direction: just changing
the text elements in the DOM directly instead of reloading the page.

On Sep 27, 11:23 am, Danjojo <[EMAIL PROTECTED]> wrote:
> Is it possible to reload the page right after I set the cookie?
> Cause I have to update all of the text in a different language..
>
> // Flag image change on menu select, set the cookie with the spoken
> language choice
> // and reload the page in that language
>
> $("#languages").bind('change', function() {
>         var country = $(this).val();
>         if(country) {
>                 // This next line uses chainable methods starting at the
> second .attr
>                 $('#countryFlag').attr("src", "images/" + country +
> ".gif").attr("alt", country + " Flag");
>                 $.cookie('language', country, {expires: 7}); // set cookie
>         }
>
> });
>
> A reload might be pointless though.. since I want to use Xpath plugin
> to replace all the text into another language, that can all take place
> on the page with the DOM replace?
>
> Thank you.

Reply via email to