Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

Selected Value after onChange #1883

Description

@glauni

Hi there,

im trying to keep the value that is selected in my dropdown after an onchange event.


selectize = $(".select").selectize({
    create: true,
    allowEmptyOption: false,
    delimiter: ',',
    plugins: ['restore_on_backspace'],
    onChange: function(value){
      location.href = window.location.protocol + '//' + window.location.host + '/c/' + value
    }
  });

Obviously, without the location.href my selected value is set and also persists, however i'd like to have it persist even when im changing the url.
I didnt seem to find any other question regarding this case - would be nice if someone has an Idea how to achieve this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions