This is a migrated thread and some comments may be shown as answers.

Sending multiple values...

2 Answers 108 Views
XmlHttpPanel
This is a migrated thread and some comments may be shown as answers.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 06 Jul 2010, 02:29 PM
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 Answers, 1 is accepted

Sort by
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 06 Jul 2010, 03:06 PM
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); 
                    } 
                }); 
            }); 

0
Pero
Telerik team
answered on 09 Jul 2010, 09:27 AM
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
Tags
XmlHttpPanel
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Pero
Telerik team
Share this question
or