Function(data) not being executed after $.post ...

Function(data) not being executed after $.post ...

Hi,

I am new to all this but making good progress and having fun in the process.

ok, I have written quite a bit over recent weeks (including a few $.post / $.ajax calls) for various sites/applications but this one is really puzzling me. Here is a snippet of code that is causing me problems.

  1.       $.post("/cgi/pmdb/getTSDs.pl", {team: ui.item.id},
  2.                                               function(data) {
  3.                                                 alert("Data>" + data + "<Data");
  4.                                                 var TeamMsg = [...various manipulations of data...]
  5.                                                 $("#detail").text(TeamMsg);
  6.                                               },
  7.             "json"); 

The problem is that execution jumps from line 2 to line 6 ... ignoring the function(data) and I am not sure why.

I get the correct value of "team" arriving at the perl script .... and the perl writes the correct json back ...

I just can't think where else I need to look to debug this - as I said, I have done something similar 5-6 times over the last few weeks - all without a problem. So I am sure I am doing something stupid here.

Thanks
Chris