Im building a file upload with jQuery, but Im getting a jQuery error trying to set the attributes of the form:
$(document).ready(function () {
$(\"#forms
You know instead of fetching the same item multiple times, why not just reuse it:
var form = $('#theuploadform');
form.attr("action", "/ajax/user.asmx/Upload");
form.attr("method", "post");
// and so on
What kind of error are you having? can you post it?
UPDATE
Since you cannot set the attribute yourself here is a work around:
Put the form in an iframe, and attach an onchange event to the input button. when the user select a file, you trigger the necessary code to upload the file (submit), then the parent window can close the iframe.