XSP Partial Refresh

2019-08-12 06:08发布

问题:

I am trying to send a value to server from anchor link and I call following code from a function which is called from the anchor link. Although I am able to trigger partial refresh,I get an error...any pointers please.....

var refreshId=dojo.query('[id$="testPanel"]')[0];
      alert(refreshId.innerHTML)
        alert(refreshId.id)
    var mySubmitValue='whatYouWantToSendHere';
    XSP.partialRefreshGet(refreshId, {
         params: {
          '$$xspsubmitvalue': mySubmitValue
         },
         onStart: function () {
               alert('starting');
         },
         onComplete: function () {
               alert('Complete');
         },
         onError:'myErrHandler( arguments[0], arguments[1] )'

    });

回答1:

You are sending the object to the server. Use the id of the element instead:

XSP.partialRefreshGet(refreshId.id, {