Varun,
It is not setting property 'branch' as per selection
In JavaScript, an "onchange" event does not change anything, it responds to a change. So, when the user clicks on the "branch" select box and changes the value, it calls your code.
In AJAX, the server-side URL that you call is expected to return XML as output. Does your "currect" action return XML?
Your code indicates that the JavaScript function "processStateChange" is to be called when the response is received from the server. You haven't shown us that function, so we have no idea what it does or if it exists. What it is generally supposed to do is use JavaScript functions to parse the XML returned from the server and then use the Document Object Model (DOM) to change the HTML document in some way.
What should i do to set this property from java script?
I'm afraid I don't have enough information to answer htis. It sounds like you want to change the value in the "branch" select box.. Ok I get that. What do you want to trigger that change? How do you want to change it? from what to what?
Here's my advice: If you're not a strong JavaScript coder, don't bother with the nitty-gritty details of AJAX, but use a framework instead. The one I've used and highly recommend is
DWR. Go to the website, download it, and do some of tutorials they suggest, and then try this again using DWR.