ajax - Jquery/struts 1 combobox dynamic -


i have 2 combobox linked i.e if select 1 , combobox have corresponding data. using jquery call struts action via ajax. struts actions side, sending latest data based upon valuse selcted first copmbobox not reflected on page. have refresh whole page/form? if yes, point of using ajax?

$(document).ready(function() {           $("#marketchange").change(function() {              var marketcode = $(this).val();             //var marketcode1 = document.getelementbyid("marketcode").value();             //alert(marketcode1);              $.ajax({                    type: "get",                    url: '<%=contextpath%>/managerangesaction.do?actiontotake=getislandsformarket',                    data: ({ market: marketcode }),                  success: function(data){                     alert(data)                   }              });                }); 

the data in form not updated. struts side arraylist second combobox changed not refreshed on jsp page.

and in general how update form data whenever make ajax call server side?

at work use ajaxtags


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -