## Sunday, December 26, 2010

You can easily submit data in an html form via jQuery's $.post. But you need to do a little more to upload a file. I suggest the jQuery Form Plugin. Here is the HTML form: <html> <head> <title>Carter Tomorrow Fund Donations</title> </head> <body> </body> </html>  This is the Javascript file myFrom.js: And here the cgi script "test.cgi" in Ruby Make sure that your cgi script has the right permission, 755. Of course you would first manipulate the data instead of just mirroring it. #### 26 comments: 1. It's not working... And why form is after html ? 2. hahaha let me try first.... wish it works. (^^'a... 3. works...!! it workss...!!!! I used it in a jsp environment... and it works...!! (god bless u, author). :D 4. Thanks for this post!!! I had to change some things up to refresh a DIV with an MVC Partial View, but this post definitely pointed me in the right direction! Thanks again! 5. I get this error:$("form").ajaxForm is not a function

1. Need include jquery library

2. Import jquery.js look at jquery.com

6. How can we use this in a JSP environment? I need to know this urgently? I mean how can I submit this to a servlet and process the upload? Can someone please help?

7. How i get file "myForm.js" ??

Let me try this code first :)

9. Nice, thanks ... not that hard .... do you mean "advice" not "advise" in your title ?

10. Copy - Paste nubs, all of U

11. ITS NOT WORKING ..

ANYONE:
can you teach me how to make a virtual classroom??
or are there any sites where i can learn.
i know very basic PHP,javascript.
This is for my thesis.
Hope SOMEONE GOOD will HELP.
URGENT.. ^^,

12. well, but this is not ajax and in this case jquery is not necesary

13. it's working fine..for me <3

thanks

14. can you upload your js file which you include in you code

15. thanx. work fine also for me

16. Brilliant, thanks!

17. Thanks Bro.... This is exactly what i want.
Great help.. Thanks

18. It is not working on IE-8

19. I dont know anything about ruby :((

20. Its working fine..Thanks a lot...

21. thanks for this tutorial, I like this and I want to practice this tutorial to my project website

22. nice tutorial, and i will wait your next tutorial mo advance

23. workssss!!!!!!! only in FF -.-''