Posted By:
Anonymous
Posted On:
Sunday, March 4, 2007 10:31 AM
You say that you are able to view data needed using responseText property and not with responseXML right?? in the JSP where your are processing the request and sending the response, are you setting the response type as xml??? check that..
Code snippet for you
<%@ page import="com.mot.iden.pt.dto.ASPMonthlyPriceScreenDTO" %>
standalone="yes"?>
<%
response.setContentType("text/xml");
ASPMonthlyPriceScreenDTO dto = (ASPMonthlyPriceScreenDTO) request.getAttribute("TABLE_PRICES");
if( dto == null )
{
dto = new ASPMonthlyPriceScreenDTO();
}
%>
<%=dto.getBpp()%>
<%=dto.getAdders()%>
<%=dto.getAddersSelected()%>
<%=dto.getUpgrades()%>
<%=dto.getUpgradesSelected()%>
<%=dto.getCo_op()%>
<%=dto.getMisc()%>
<%=dto.getMiscNotes()%>
<%=dto.getNetR()%>
<%=dto.getNetRIds()%>
<%=dto.getPercentDisc()%>
<%=dto.getAbsoluteAmt()%>
<%=dto.getIdSet()%>
now I get the response back as XML. in the callback function, just say
as req is your request object..
var response = req.responseXML.documentElement;
from now on you can access data in it using
var bpp = response.getElementsByTagName('bpp')[0].firstChild.text
Is this what u expected??