function paintSXML(SXML, BObject,BSearch)
{
var nodes = SXML.selectNodes("//ColumnInfo/*")
//adding in data retrieval of requested record; will remove separate function after this is completed.
var Requestor = document.getElementById("Requestor").value;
var Connection = document.getElementById("Connection").value;
var arrstring = document.getElementById("commandbox").value.split(" ")
var searchstring = arrstring[1]
var reportFetch = new ReportFetch(Requestor, Connection); //standard
reportFetch.SetRelativePath("../../isapi/bwebrqb.dll"); //standard
reportFetch.SetApplySecurity(true);
var DataObject = reportFetch.AddDataObject(BObject);
reportFetch.AddProperty(BObject,BSearch)
for(y=0;y<nodes.length;y++)
{
reportFetch.AddProperty(BObject,nodes[y].nodeName);
}
var DataWhere = DataObject.GetWhereClause();
DataWhere.AddParam(BSearch, searchstring , "eq");
var reportfetchXML = reportFetch.GetRecords();
if (reportfetchXML)
{
var responseNode = reportfetchXML.selectSingleNode("//Response/Detail");
}
var html = "<table>"
for(x=0;x<nodes.length;x++)
{
var colval=""
var colval = responseNode.getAttribute(nodes[x].nodeName)
html += "<tr>"
html += "<td>" + nodes[x].getAttribute("Tag") + "</td><td><input value='" + colval + "' type='text' id='general_" + nodes[x].nodeName + "_1' \
name='general_" + nodes[x].nodeName + "_1' size='" + nodes[x].getAttribute("MaxLen") + "' title='" + nodes[x].nodeName + "' /></td>\
</tr>";
}
html += "</table>";
$('#divregion').html(html)
}
|