javascript - keep spring form select value -


i use spring mvc 4 bring list , show on website

<s:select path="almacenesbyalmori.codalm" id="select1" name="select1" onchange="tr_enviaralmacen('select1');" items="${listalmacen}" itemvalue="codalm" itemlabel="nomalm" class="form-control input-sm"></s:select>   <script> function tr_enviaralmacen(sel){   var cbox = document.getelementbyid(sel);   var valor = cbox.options[cbox.selectedindex].value;   var red = "getprodxalm?cod_alm="+valor;   location.href = red; }                                                 </script> 

as can keep option of select spring form selected reloading page?

view rendered server everytime refresh(i mean 'hard refresh' without browser caching) page, means model refreshed , proper selected values injected in view(the values wich posted , saved).

to keep selected option while refresh page have use ajax. need http post selected options everytime user selects in select form.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -