JQuery/AjaxFileUpload: how do i transmit custom parameter to server

Posted on 2011-10-05
Last Modified: 2012-05-12
hello all,

the jquery plugin AjaxFileUpload works fine in my project.  I mean the codes from here works:

the problem is, i would like to transmit more parameter to server, for example, each time when the codes run, i would like to send the value of Id to server.

the original Codes are attached here.  I have tried to add a new line there:

data: {id='1'},

but it seems not be sended to server.

any suggestion about how to send it to server and then read it from server?



                dataType: 'json',
                success: function (data, status)

Open in new window

Question by:wantime
    LVL 5

    Accepted Solution

                    dataType: 'json',
                    success: function (data, status)

    would be one way to do it ...

    use $_GET['id'] to access the variable from doajaxfileupload.php ... and be sure to validate that it's a number, so nobody can inject arbitrary code.

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Suggested Solutions

    Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now