Welcome Guest, Not a member yet? Register   Sign In
Linked DropDownList
#1

[eluser]HugoA[/eluser]
Hi!
I'm trying to link two dropdownlist depending on the value you select from the first dropdownlist.
I don't have any idea how to do this, so if you guys can point me to the right direction would be great.

What i want to do is select a value from the first dropdownlist an depending on his value show somo options in the second dropdownlist.

I try doing this:

1-when the "OnChange" event of the firts dropdownlist occurs i call a jaascript that redirects to a methor in a controller (for example: index/mainController/firstMethod/selectedValue.
2-the method in the controller using url helper extracts the "selectedValue" to do a database search of the value of the second dropdownlist.
3-the same method load the view (the one that have the ddl)

Doing this i lose the selected value of the firts ddl.

I think this is not the right way to do it.

So, once again, i need some help.

Thanks for your time.




Theme © iAndrew 2016 - Forum software by © MyBB