Bear Bibeault wrote:Ajax itself has no capability to upload files.
One of the beauties of jQuery, though, is that it can handle such things in a transparent manner.
If you use the jQuery Form Plugin, and submit a multi-part form using its Ajax methods, it will "do the right thing" and submit a normal form request to an iframe.
Gregg Bolinger wrote:Try implementing the success callback. That way, you deal with what happens with the returned data instead of the plugin trying to figure it out for you. This is all in their documentation.
Bear Bibeault wrote:Your ajaxForm call is malformed so it is not instrumenting the form, which is getting submitted normally.
Bear Bibeault wrote:What does inspecting the HTTP request show? Is it being fired off at all? If so, is it a properly formed multi-part request?
(P.S. HttpFox is a good tool for inspecting requests.)
Bear Bibeault wrote:That's the usual way to do it. ajaxForm() will submit the form to whatever url is specified by action.
Bear Bibeault wrote:If you are getting a new page, the form is being submitted "normally", which tells me that you ajaxForm call still isn't "taking".
Perhaps you could post (neatly) the relevant code and form markup.
Steve Dyke wrote:It appears that the code in the head tag of the child div JSP is not firing.
Gregg Bolinger wrote:
Steve Dyke wrote:It appears that the code in the head tag of the child div JSP is not firing.
Hm, when pulling snippets of code into a JSP via jquery, I usually don't have a head tag. An HTML page should only contain 1. That might be your problem. Ha, the part of your code you didn't show us.![]()
Gregg Bolinger wrote:A taglib declaration isn't required to be placed in the HEAD element. Just put it at the top. It doesn't really matter because it is removed from the final HTML anyway.
Steve Dyke wrote:Worked great. I think it must have been the $('#ft') that it could not find.
Anyway, thanks for the help.
The only taste of success some people get is to take a bite out of you. Or this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|