You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tedy Marcos Colombini <te...@gmail.com> on 2009/03/27 11:48:35 UTC
problems with Struts 2.0.11 and Dojo
Hi there,
I am trying to submit a form as an ajax request
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<s:head theme="ajax" debug="true"/>
<script type="text/javascript">
function submitForm() {
var kw = {
url: "example.HelloWorld!execute.action",
handleAs:"text",
load: function(response){
dojo.byId('divResult').innerHTML = response;
},
error: function(data){
console.debug("An error occurred: ", data);
},
timeout: 2000,
};
dojo.xhrGet(kw);
}
</script>
</head>
<body>
<input type="button" onclick="submitForm()" value="Javascript" />
<s:div id="divResult"></s:div>
</body>
</html>
--
Tedy Marcos Colombini