开发者

Javascript function consuming wcf method with a client side parameter

开发者 https://www.devze.com 2022-12-27 06:32 出处:网络
I\'ve got a wcf service that returns me an array of items. I\'ve got a javascript method that recieves the items and handles them.

I've got a wcf service that returns me an array of items. I've got a javascript method that recieves the items and handles them. I want to send the javascript function another parameter from the client side, an id of an object on the page.

Something like this:

function WriteSonC开发者_运维技巧ategories(selectedCategoryId, callback) {
              var d = new Date();
              MyServices.GetSonCategories(selectedCategoryId,
                                         d.getTime().toString(), callback );
          }

I'd like the callback to be able to recieves a certain id, not just the array of objects returned from the service. How can this be achived?

Thank you!


Maybe Something like this.

0

精彩评论

暂无评论...
验证码 换一张
取 消