benhowdle89
benhowdle89

Reputation: 37464

Spurious jQuery ajax GET parameter

I have this PHP in a while loop:

echo "<td><a href='#' class='po'>" . $row['order_no'] . "</a></td>";

and this jQuery:

$(".po").click(function(){
                var po = $(this).text();
                var dataString = 'po='+ po;

                $.ajax({
                  context: this,
                  type: "GET",
                  url: "projectitems.php",
                  data: dataString,
                  cache: false,
                  success: function(html) {
                    $(this).closest(".resultsItems").html(html);
                  }
                });

            });

But the parameters of the GET is this:

  _ 1291741031991
  po    102

po is correct but what on earth is the top line?? This was from Firebug by the way

Upvotes: 5

Views: 272

Answers (1)

karim79
karim79

Reputation: 342635

You've set cache to false, so the number, I'm guessing, is the 'cache-breaker' that jQuery is appending to the query string.

Upvotes: 6

Related Questions