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.
- $.post("/cgi/pmdb/getTSDs.pl", {team: ui.item.id},
- function(data) {
- alert("Data>" + data + "<Data");
- var TeamMsg = [...various manipulations of data...]
- $("#detail").text(TeamMsg);
- },
- "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