This is not a sql server question but a web-programming question. The answer, quite briefly is:
a) reload the page with the correct (i.e. altered) settings;
c) have a pop-up that alters the underlying page.
The technique is awlays the same: call another page in the onChange event of the listbox, then on the other page, execute the sql, scribble some js and have that js update the option list in the actual listbox.
Brief answer, but I consider this thread to be off-topic so ...