ทำไมส่งค่า ajax สองค่าแบบนี้ไม่ได้ค่ะ รบกวนแนะนำด้วยค่ะ

    var sel = GEvent.element(event); // select ที่ส่งค่ามา

    var pricedata = document.getElementById( 'idpricedata' ).value;

    new  GAjax().send('../limousine/check_name_price.php', 'id=' + sel.value&'idpricedata=' + pricedata, function(xhr){

        var datas = xhr.responseText.toJSON(); // แปลงเป็น JSON
กรกฎ วิริยะ 27 มี.ค. 2555 19:13
55+++



เท่าที่ดูก็ถูกนี่



จริงๆแล้วการใช้ event ด้วย GAjax การอ้างงถึง เจ้าของ event สามารถใช้ this ได้เลยครับ



var doSelChanged = function(e){
   var q = 'id=' + this.value; // ค่าของ select เจ้าของ event
   q += '&idpricedata=' + $E('idpricedata').value; // ค่าอื่นๆ
   alert(q); // ตรวจสอบค่าที่ส่งมา (debug)
   new GAjax().send('http://......./check_name_price.php', q, function(xhr){
       alert(xhr.responseText);
   });
};


ไฟล์ check_name_price.php

<?php
    print_r($_POST);
?>