• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Ajax]How to observe the value of the element using element id?

Hi all,
am using Ajax in CI.
I downloaded Ajax library from CI.
I have one dropdown list. When I change the value from dropdown list, I want to get selected value from dropdown list & using this value I want to check with my table then I want to retrieve some value from table related to my selected value.

My question is,
Using Ajax, How can I get selected value from dropdwon list?
pls advice me.

<select name='country' id='country' >
<option>United status</option>

Then when I select my country, I want show state of the selected country.
Example Now choose India from dropdown list.
then I want to dispaly state list like this
<select name='state'>
<option>Tamil Nadu</option>
State List , I stored in my table based on the country name. So I want to capture selected country value from dropdown list & I want to match with my table.

Please help to me.

I tried to use these two functions. But I coudn't get solution.

pls advice me

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.