Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Do your JS code and WS share the same path? Try specifying the path to the webservice, and I included an easier initialization of the object.</p> <pre><code>function sendStates(data) { var states = {Id: 1, Name: "Chandan"}; $.post("/WebService.asmx/MultiDim/", states, function (data) { alert("reached"); }); } </code></pre> <p>UPDATE: Have you watched the network traffic to verify that a request is actually being sent to the service, or watched in the console for any post feedback?</p> <p>I implemented the following on test application (minus the webservice) with no issues at all:</p> <pre><code>function dataTest (data) { console.info('Arrived in the dataTest function'); var states = { Id: 1, Name: 'Dustin' }; $.post("Home/SomeTest", states, function (data) { console.info('Post complete, data below'); console.log(data); alert('here'); }, 'json'); } var ob = [{ Id: 3, Name: "Test" }, { Id: 4, Name: "Testing"}]; dataTest(ob); </code></pre> <p>UPDATE 2: Were you able to verify that function is actually getting called, via console or network? Toss in a console.info('some text here') to determine if you are even making it into your function. If you are making it into your function, the problem lies in the WebService. If you are not making it to the function, the problem lies in your JS.</p> <p>Update 3: I would begin by verifying that you can call the WebService with the address you posted, and that it functions as expected. If that passes: If the call is the result of an event and it's corresponding handler: I would begin by tracing from the event handler, verifying that it is indeed being triggered, and finally that it is making it to the sendStates(data) call. Else: Set breakpoints and verify that you are making to your sendStates(data) call. Google Chrome makes Javascript debugging a walk in the park, if you aren't already using it. Best of luck!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload