Sending multiple values...

3 posts, 0 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 06 Jul 2010 Link to this post

    I'm trying to do this:
                var panel = $find('xmlCallbackPanel'); 
     
                //Callback to the webservice for each item 
                $('.callbackitem').each(function () { 
                    var dateid = $(this).attr('id'); 
     
     
                    var text = $('#debugPanel').html(); 
                    $('#debugPanel').html(text + "<br />" + dateid); 
                     
                     
                    panel.set_value(dateid); 
                }); 

    Ok, so I have a radgrid, and on $(document).ready I want to loop through each row and send that data back to the XmlHttpPanel to process and return data (which I'll handle clientside)

    problem is, the set_value is sending back the same value over and over again.  The debugPanel step above shows me the IDs I'm trying to pass and they're all unique....but examining the Posts shows the same ID 40+ times.

    Can it not do this? 

    Should I just use a regular jQuery ajax callback?


  2. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 06 Jul 2010 Link to this post

    jQuery callback works fine it seems
                $('.callbackitem').each(function () { 
                    var dateid = $(this).attr('id'); 
     
                    $.ajax({ 
                        type: "POST"
                        url: "http://site/WebLink.asmx/DoesDateIDExist"
                        data: "{'DateID': '" + dateid + "'}"
                        contentType: "application/json; charset=utf-8"
                        dataType: "json"
                        success: function (msg) { 
                            OnCallbackEnded(msg.d); 
                        } 
                    }); 
                }); 

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 09 Jul 2010 Link to this post

    Hi Steve,

    I am not sure if this influences the sending of the right value, but the XmlHttpPanel updates its innerHTML whenever a callback to the web service is initialized. Please, leave the XmlHttpPanel empty and see if you get the same results.
    If this does not help, please send some sample code that demonstrates the issue, so we could reproduce it locally.

    Kind regards,
    Pero
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top