1

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] )'

    });
prasad katankot
  • 157
  • 1
  • 14
  • What exactly is the error you get? Did you you check browser console? Also rather than using `dojo.query` you can actually write like this - `XSP.partialRefreshGet("#{id:testPanel}", {...` – Naveen Nov 15 '12 at 14:20
  • args -> [object Object] [object] url -> http://XXX.XXX.XXX.XX/MobFrameWrk.nsf/m_MobPage.xsp?openpage&db=testdev.nsf&unid=2638E3B470B9C3C843257AB700290BE0&pag=doc&$$ajaxid=%5Bobject%20HTMLDivElement%5D [string] query -> view%3A_id1%3AdjTextBox1=&%24%24viewid=!dbleskmjcn!&%24%24xspsubmitid=%5Bobject%20HTMLDivElement%5D&%24%24xspexecid=&%24%24xspsubmitvalue=A1856F5D79CF162B43257AB6004EF4EE&%24%24xspsubmitscroll=0%7C0&view%3A_id1=view%3A_id1 [string] handleAs -> text [string] xhr -> [object XMLHttpRequest] [object] – prasad katankot Nov 15 '12 at 14:29

1 Answers1

1

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

XSP.partialRefreshGet(refreshId.id, {
Sven Hasselbach
  • 10,455
  • 1
  • 18
  • 26
  • Thanks Sven, Naveen.It worked when I kept the code same and instead of the ID of panel, replaced with ID of AppPage of singlePageApp. The finding was that ---- partial refresh of panel inside AppPage gives error. – prasad katankot Nov 15 '12 at 14:48