views:

57

answers:

3

Hi,

I have dropdown with some optional value.if change the those value based on that will display another dropdown with value from database.I am doing this process in jsp page.First dropdown values are static(coded in jsp).but second dropdown values are come from database when changeevent of first dropdown.

Here i need to implement ajax or javascript ? Could you give me examples of this drop down.

A: 

You can do it with JQuery and Ajax pretty easily. Check out http://www.chazzuka.com/experiments/jquery-dropdown/

for an example

StressChicken
A: 

You have two drop down

somevale

now you need to give body to our get_result function

function get_result() { var value = $("#id).val(); JQuery.ajax("some_url",{ id : value }, function(){} ) }

This way you can do this. You specific check JQuery tutorial.

Dinesh Atoliya
A: 

Here i need to implement ajax or javascript ?

Ajax.

Could you give me examples of this drop down.

JQuery works fine. I found DWR framework to be easier to understand for newcomers to Ajax. You can look at tutorials on that here.

CoolBeans