2010-12-07 2 views
5

가짜 jQuery를 아약스 GET :내가이 while 루프에서 PHP가 매개 변수

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

이 jQuery를 :

_ 1291741031991 
    po 102 
:

$(".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); 
        } 
       }); 

      }); 

그러나 GET의 매개 변수는 이것이다

포는 정확하지만 지구상에서 가장 중요한 것은 무엇입니까 ?? 이것은 Firebug에서 나온 것입니다.

+1

'href = "#"'? 강아지가 방금 죽었습니다. http://icant.co.uk/articles/pragmatic-progressive-enhancement/#build – Quentin

답변

6

당신은 cache를 false로 설정했기 때문에, jQuery가 쿼리 문자열에 추가하는 'cache-breaker'라고 생각할 수 있습니다.

+0

+1 - yup, 현재 타임 스탬프 -'new Date(). getTime()'출력. –