| Author |
struts2 with ajax: howto return a value to div?
|
Peter Primrose
Ranch Hand
Joined: Sep 10, 2004
Posts: 755
|
|
Hi Trying to use AJAX with struts2. I'm 'paraphrasing' an example from the apache site. The objective is to return a simple value (field name=data) to a dvi ('myID') I did this: * JSP * ~~~~~~~ when the user clicks the doIt the action, testAjax1, is executed (showing the 'data' the user has input) * ACTION * ~~~~~~~~~~ public String testAjax1() { System.out.println("say something: "+data); return "t2"; } and routed to AjaxResult3.jsp: *XML* ~~~~~~ OUTPUT: The result, AjaxResult3.jsp, comes in a NEW page with the 'data' value the user has provided "AjaxResult3.jsp" ----------------- My question is how to have the result get to myID and not to a new page? Thanks [ February 19, 2008: Message edited by: Bear Bibeault ]
|
 |
 |
|
|
subject: struts2 with ajax: howto return a value to div?
|
|
|