struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MyAshok <>
Subject Re: struts2: simple ajax form - returns value to a new page (not to a DIV)
Date Wed, 20 Aug 2008 09:35:27 GMT

Hi all,

Thanks for all your response.

Finally i isolated the problem and found that the problem is with the ajax
submit of the same div. (i.e) my form and the submit targets to the same
div. This scenerio creates the problem that the values in the jsp is not
populated to the action by autowiring.

<div id="id1">
<s:form id="myform" action="login" >
<s:textfield name="username"/>
<s:submit type="submit" theme="ajax" targets="id1"/>

In struts.xml, <result type="success">login.jsp</result>

How can i sort out this issue.

I tried with simple samples and searched as much as possible. But i cant get
a clear solution.
Waiting for some clear solution.

Thanks again to all.

With Regards,

Jeromy Evans - Blue Sky Minds wrote:
> Martin Gainty wrote:
>> var xmlhttp=dojo.hostenv.getXmlhttpObject()
>> var response= xmlhttp.responseXML;
>> var parsed_response=SomeXMLParser(response);
>> document.getElementByTagId("div").innerHtml = parsed_response;
>> -->
>> </script>
>> yes/no?
>> Martin 
> That would work, but dojo already includes code to invoke the right XML 
> parser depending on the browser and includes code to strip the 
> javascript out of the parsed response and execute it after updating the 
> DOM.  So it's best to reuse that code (which is behaviour of the widget) 
> rather than rewrite an 80% complete solution.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message