0

I had a question directly opposite to the next one:

I'm using the jQuery ChosenMultiSelect plugin. When using IE 11 or Microsoft Edge, if I select 3 options from the dropdown, browse to another page and then press the browser back button, the values are not retained in the textarea.

In Chrome if I do the same thing the values are retained.

Anamnian
  • 417
  • 4
  • 20

1 Answers1

0

I've done this works by setting parameters in the URL by window.history.pushState (null, null, url);.

Function from this answer:

function parameterizeArray(key, arr) {
    if (!arr) {
        return "";
    }
    arr = arr.map(encodeURIComponent);
    return '?' + key + '=' + arr.join('&' + key + '=');
}
Anamnian
  • 417
  • 4
  • 20