Accessing value of dropdownlist to send to mysql via php

3 posts, 0 answers
  1. Jan Ubbo
    Jan Ubbo avatar
    3 posts
    Member since:
    Dec 2011

    Posted 16 Mar 2012 Link to this post

    Hello fellow Kendo's,

    sorry to be n00by, probably it's very simple...
    I am trying to read out a value of a dropdown-list to pass to a php file for mysql query...

    Attached is the file, you can also see it live here:
    http://www.trinamic.com/psearch/

    Upon selecting a motor type, i can already coax out an alert, but how do i get the value in there?

    I've tried a variety of stuff:
    (motor.text());

    and

    var mdropdownlist = $("#motor").data("kendoDropDownList");
    var text = mdropdownlist.text(); 

    but to no avail...

    Can anyone help? It would be much appreciated ; )


    Kind regards from Germany, Ubbo
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 19 Mar 2012 Link to this post

    Hi,

     You need to use the value method of the dropdown list to get its value. You can also check the client side API demo.

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Jan Ubbo
    Jan Ubbo avatar
    3 posts
    Member since:
    Dec 2011

    Posted 19 Mar 2012 Link to this post

    Hi Atanas Korchev,

    sweet! That worked out...
    Thanks for the quick help ; )
    Unfortunatly I already bumped into the next snag, but it concerns the grid widget, so I'll post it there (one i got that I should be good to go).

    Kind regards, Ubbo
Back to Top