Home Problems with <select> filter

# Problems with <select> filter

pfandflaschen
1#
pfandflaschen Published in 2017-12-05 10:00:17Z
 i coded an select filter for my website: Filter 
 before selecting anything in the "selection-window" on the website you read "category1". i guess thats default(?). but if i selected a category (and that works: you can read in the "selection-window" e.g. category3) and then click on the "filter"-button the website refreshes but in the "selection-window" you again read "category1" and not the selected category e.g "category3". i guess the selection doesn't work right. how can i solve this that when clicking the button you still read your selected category? also i want to display the selected option on a different part of the website. my current code for this:   that as well doesn't work. i hope you can understand what i mean, my english is pretty bad. sorry for that.
Fabio_MO
2#
 The script has an error, you should use a function:  function test() { var m = document.getElementById("selection").value; alert(m); }  Test

 First, the question essentially contains 2 questions packed into one, don't do that. Second, you are simply missing the preselection of the  ... ` also i want to display the selected option on a different part of the website. Then store the selection somewhere (e.g. a DB), retrieve the selected value before the different part is rendered and simply output it in the different part.