Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 795
benhowdle89 Avatar asked Dec 07 '10 16:12

benhowdle89


1 Answers

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

like image 129
karim79 Avatar answered Oct 20 '22 14:10

karim79