Forums

how to pass values from a combobox to javascript

Last post 12/22/2008 5:51 PM by Anonymous. 1 replies.
Sort Posts: Previous Next
  • Dijesh Mathew

    how to pass values from a combobox to javascript

    12/22/2008 4:33 PM
    • Not Ranked
    • Joined on 12/22/2008
    • Posts 30

     Hi,

    I am very new to dev express. In my application, I am using document.getElementById('"<%comboboxname_ClientID%>').value to pass the values to javascript. when i started using dev express combobox control, I am not able to pass the values. please tell an alternative solution on this..I am adding my code here as well..

     <script type

    ="text/javascript">

    function abc() {

     

     

    def(document.getElementById('<%=a.ClientID%>').value,document.getElementById('<%=b.ClientID%>').value,document.getElementById('<%=c.ClientID%>').value);

    };

     

     

    </script

    >

     <script type="text/javascript" src ="xyz.js">

    where a,b,c are combobox id's..I have to get these values from the combobox and pass those values to xyz.js

     

    Filed under:
  • Anonymous

    Re: how to pass values from a combobox to javascript

    12/22/2008 5:51 PM

    Hi,
    You can get the value of the ASPxClientComboBox in the following manner:

    <dxe:ASPxComboBox ... ClientInstanceName="comboBox">
        ...
    </dxe:ASPxComboBox>

    <script type="text/javascript">
        var value = comboBox.GetValue();
    </script>

    You can find more info about the client-side API of the ASPxComboBox here.

More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.