in
Forums
Blogs
DevExpress.com
Client Center
Support Center
DevExpress Channel

how to pass values from a combobox to javascript

Last post 12/22/2008 5:51 PM by Victor A (Developer Express). 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12/22/2008 4:33 PM

    how to pass values from a combobox to javascript

     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:
  • 12/22/2008 5:51 PM In reply to

    Re: how to pass values from a combobox to javascript

    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.

    Victor
    R&D, ASP.NET Team, DevExpress Inc.

    P.S. If you wish to receive direct assistance from our Support Team, use Support Center.
Page 1 of 1 (2 items)
Copyright © 1998-2009 Developer Express Inc.
ALL RIGHTS RESERVED