This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
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.
I thought that was what the code in my parent page was doing:
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.
Joined: Nov 16, 2004
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.
Thanks for taking time to help me with this. Plaese be patient with me, I really need to get this to work. Have spent more than a day on this one issue. However it is still is not working. This will not produce an uploaded file.
Something I just thought about, the "ft" form is not a part of the dom until the div gets populated by several clicks after the parent JSP loads.
I have moved this to the parent JSP and I am getting the first alert message:
This is the JSP that populates the parent div:
I have already posted the Servlet code.
Joined: Nov 08, 2001
This is wrong:
You should not be catching the submit of the form! The plug-in does that itself. You just add the ajaxForm on the page load with options.
If you need to do validation of some sort, that should be handled with the beforeSubmit
Steve Dyke wrote:Worked great. I think it must have been the $('#ft') that it could not find.
Anyway, thanks for the help.
Well, part of the problem is that your jquery selector for the form is on the parent JSP. Any future DOM elements that come into existence won't matter. You'd have to trigger that code once the new stuff comes in. There is a $.live feature to help with this as well as a liveQuery plugin. But that is somewhat beside the point. I just wanted to explain to you why your selector didn't work in the first place; because the form didn't exist yet.