SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Cannot pull POST data

    I am trying to convert some code from PHP to ASP and got about 99% through it and have an error on one line.

    On page sort.asp there is code that allows the user to drag a list of items around to put them in order. Each time they drag an item it uses script to push the new location to update.asp where code will update a database with the new list order.

    My problem is that the POST data is not coming across.

    sort.asp uses this...

    Code:
    <script>
    $(document).ready(
    function() {
    $("#sortme").sortable({
    update : function () {
    serial = $('#sortme').sortable('serialize');
    $.ajax({
    url: "update.asp",
    type: "post",
    data: serial,
    error: function(){
    alert("theres an error with AJAX");
    }
    });
    }
    });
    }
    );
    </script>
    update.asp uses this to pull the POST data, but I have checked and it is getting nothing...

    strMenu = Request.Form("menu")

  2. #2
    SitePoint Guru
    Join Date
    Jun 2007
    Posts
    675
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    your ASP code looks correct. have you verified that the variable serial has data with an alert ?

  3. #3
    SitePoint Member
    Join Date
    Apr 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the suggestion. I finally gave up and switched back to PHP. I think the issue is that the PHP code was processing an array and I was trying to do in ASP without an array.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •