locked
parameter not pass throught the ajax for click event RRS feed

  • Question

  • User436258536 posted

    hi friends

    i use ajax code for send parameter to controller for click event . this coding work for autcomplete

    but i want to pass value for click the <td id="test"> i want send "MultiValueListResult" value to contoller through ajax 

    but value not pass  for click event it work autcomplete event

    can any one solve this problem 

      $(document).ready(function () {
            $("#pid").mouseenter(function () {
                //var valueString = new Array();
                var valueString = "";
                $(".ad:checked").each(
                function () {
                    valueString += this.value + ","
    
                }
                );
    
    
                var MultiValueListResult = valueString.slice(0, -1);
    
                document.getElementById("pid").value = MultiValueListResult;
          
    });
    });
    



    $(function () {
                $('#pid').autocomplete({
                    source: function (request, response) {
                        $.getJSON("/ControlScreen/Allocate?term=" + request.term, function (data) {
                            response(data);
                        });
                    },
                    minLength: 1,
                    delay: 100,
                    select: function (event, ui) {
                        $.getJSON("/ControlScreen/AddDriver?term=" + ui.item.value, function (data1) {
                            document.getElementById('pid').value = data1['pid'];
                        });
                    }
    Thursday, October 10, 2013 2:20 AM

Answers

All replies