This is a migrated thread and some comments may be shown as answers.

How to set the value to combo box using java script

1 Answer 87 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Uma
Top achievements
Rank 1
Uma asked on 23 Jan 2012, 08:15 AM
Hi,
I am using radcombo box. I bind values to combo box. in server side.

After that , i need to set the selectedvalue to combo box in java script.

Because , i am getting the selected value of combobox in java script only.

i am not getting this in server side. i need to set the value in client side only.

how to set the value in java script?

i am using vs2010.

Thanks,
Uma



1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Jan 2012, 08:58 AM
Hello,

I suppose you need to set selected value in ComboBox.Try the following.
JS:
function OnClientLoad(sender, args)
   {
     var itm = sender.get_items().getItem(1).get_text();
     sender.set_text(itm);
    }

Thanks,
Princy.
Tags
ComboBox
Asked by
Uma
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or