Client-Side Syntax Question

3 posts, 0 answers
  1. Mark Galbreath
    Mark Galbreath avatar
    171 posts
    Member since:
    Jul 2009

    Posted 12 Jan 2010 Link to this post

    When the selected index changes on my RadComboBox, I need to populate various RadTextBoxes with data from the database.  I have a blank VB aspx page with code-behind waiting for a request object parameter containing the primary key in the page_load method, but it never arrives from my Javascript function:

    function indexChanged(sender, args) {  
        var id = sender.get_text().trim();  
        $.get( 'User.aspx', { userid:id }, function(data) {  
            alert(data);  
        });  

    What am I doing wrong here?  What is the correct syntax to send a parameter from the client and receive data back in an asynchronous way?  This seems to be a very basic function, and yet I can find no help in the documentation.

    Thanks,
    Mark
  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 13 Jan 2010 Link to this post

    Hello Mark Galbreath,

    It seems that your syntax is correct. Please refer to this help article and make sure that $ actually refers to jQuery.

    Sincerely yours,
    Simon
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mark Galbreath
    Mark Galbreath avatar
    171 posts
    Member since:
    Jul 2009

    Posted 13 Jan 2010 Link to this post

    What a great resource!  http://api.jquery.com/

    I wish Telerik had such a convenient and well-documented downloadable API!!

    Thanks!
    Mark
Back to Top