« Return to Thread: dwr.util.addOptions problem to show drop down menu please help

dwr.util.addOptions problem to show drop down menu please help

by HANI YOUNIS :: Rate this Message:

Reply to Author | View in Thread

 
 
i have this class that i want to get cities for each country  here the code:
public class TestDWR {

    public ArrayList getCities(String value){
      ArrayList countriesList=new ArrayList(); 
      if(value.equals("1")){
          countriesList.add("Amman");
            countriesList.add("Jerash");
      }else if(value.equals("2")){
           countriesList.add("Jerusalem");
            countriesList.add("Haifa");
      }else if(value.equals("3")){
             countriesList.add("Macca");
            countriesList.add("Madina");
      }
      return countriesList;
    }
}
 
it works perfectly when i  test it through:
http://localhost:8084/DWRPOC/dwr/test/TestDWR
but i dont know how to see it work in my jsp  my last trial like this:
    function viewCities(value){
            //    alert("value="+value);
         
                 dwr.util.addOptions("citiesReply",TestDWR.getCities(value));
          }
 
where citiesReply is the name of drop down list.
please help.
 


Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

 « Return to Thread: dwr.util.addOptions problem to show drop down menu please help