I have a form that I would like to submit via AJAX using Spring.AjaxEventDecoration on a button. When I click on the button, the entire page refreshes, and I get a dojo error in the Firebug console saying that "ioArgs.url is undefined". Turns out that when Spring tries to submit the form upon button click, it uses dojo.byId("buttonId").href as the url. Can someone please point out what I am missing?
I am using spring-js 2.3.1.RELEASE.
JSP:
The form submitted is rendered in a Dojo Dialog pop-up, and the content in the pop-up is defined as a Tile. I expect the page not to do a full page submit when I click on the button, the form to be posted to the server, and the pop-up to be re-rendered with the response.HTML Code:<input type="submit" id="copyBtn" value="Finish" />
Javascript:
Code:Spring.addDecoration(new Spring.AjaxEventDecoration({ elementId: "copyBtn", popup:true, event: "onclick", params: {fragments: "createDialog", mode:"embedded"} }));


Reply With Quote
