I am new to prototype JS library feature.

I want to implement ajax upload feature in my web application. For
that,

1) I wrote a servlet which copies the file to a particular folder in
server.
2) HTML form, I have a upload control and a Button which fires an ajax
request. Below is the code on the button

new Ajax.Request('http://isgdev.synygy.net/servlet/
CommonsFileUploadServlet',
 {
    method: "post",
      onSuccess: function(transport){
      var response = transport.responseText || "no response text";
      alert("Check-----! \n\n" + response);
    },
    onFailure: function(){ alert('Something went wrong...') }
  });

When I click the button, the servlet is called but the selected file
is not copied to server.

But, When I submit the form, through regular post method (without
using ajax). The servlet works properly and the file is copied to
server properly.

Can you please guide me on this.

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to