I am unable to get response from server after Ajax call.
Please help me.
Depending upon the value selected in the Drodown shown below I need to build another dropdown.
I.My initial dropdown is built like this - This works fine
<select name="id_<%=edVO.getObxObservationResultKey()%>" size="1" styleClass="RegSelect" onchange="javascript: ajaxTestCall(this)"><hin:lookupOptions table="CDESSDiseasesCD" />
</select>
II.Then I call a javascript method. This is calling my
Struts action class method- This also works fine
function ajaxTestCall(inputForm) {
retrieveURL('eclrsDetail.do?method=ajaxtestCall','EclrsDetailForm')
}// end function dismiss
III. My action class method like this
public ActionForward ajaxtestCall(ActionMapping mapping, ActionForm form,
HttpServletRequest req, HttpServletResponse res) throws WebException {
req.setAttribute("showSuggestion",Boolean.TRUE);
return mapping.findForward("eclrs_detail");
}
IV. I have following code in
JSP to get response back from server
<c:if test="${showSuggestion}" >
<tr><span id="txtHint">yes I am from Ajax call</span></</tr>
</c:if>
In IV step I am failing. I do not get "I am from Ajax call" printed on jsp.(I will try building another dropdown after this). The reason seems to be because showSuggestion is still null.
why showSuggestion is not set in request attribute. Is there any other things that I need to take care?
Can anyone help me with this?
[ May 11, 2006: Message edited by: Vani D Bandargal ]