rem: var output = ""; for (i = 0; i < resultsets.length; i++) { results = resultsets[i].getElementsByTagName("livesearchitem");  output += "<p>" + resultsets[i].getAttribute("mstring") + "</p><table>"; type = resultsets[i].getAttribute("type"); hierarchy = resultsets[i].getAttribute("hierarchy");  for (j = 0; j < results.length; j++) { id = results[j].getAttribute("id");     output += '<tr><td class="browselistbuttons">'; output += '<img onclick="parent.updateStatusCombined(&quot;&amp;command=playlist&amp;sub=addtracks'; output += '&amp;' + type + '=' + id + '&quot;)" src="html/images/add.gif" width="8" height="8"/>'; output += '<img src="html/images/play.this.gif" width="5" height="9" onclick="parent.updateStatus'; output += 'Combined(&quot;&amp;command=playlist&amp;'; output += 'sub=loadtracks&amp;' + type + '=' + id + '&quot;)"/> </td><td class="browselisting">'; output += '<a onclick="parent.browseurl(&quot;browsedb.html?hierarchy=' + hierarchy + '&amp;'; output += 'level=0&amp;' + type + '=' + id + '&quot;)">' + results[j].firstChild.data + '</a>'; output += '</td></tr>';  } output += "</table>";  
add: if (xslp && !forcejs) { var fragment = xslp.transformToFragment(rxml, document); asearchdiv.replaceChild(fragment, asearchdiv.firstChild); timestr = "XSLT "; } else { var output = doTransform(rxml) asearchdiv.innerHTML = output; timestr = "JS "; 
context: function searchhandler(req, url) {	searchInProgress = 0;	document.getElementById("activesearch").style.display = "block";	rxml = req.responseXML;	var resultsets = rxml.getElementsByTagName("searchresults");	var output = "";	for (i = 0; i < resultsets.length; i++) {		results = resultsets[i].getElementsByTagName("livesearchitem");		output += "<p>" + resultsets[i].getAttribute("mstring") + "</p><table>";		type = resultsets[i].getAttribute("type"); 		hierarchy = resultsets[i].getAttribute("hierarchy"); 		for (j = 0; j < results.length; j++) {			id = results[j].getAttribute("id");			// Isn't this what XSLT is for?			// Unfortunately, Safari doesn't support XSLTProcessor, so I'll do this the hard way...			output += '<tr><td class="browselistbuttons">';			output += '<img onclick="parent.updateStatusCombined(&quot;&amp;command=playlist&amp;sub=addtracks';			output += '&amp;' + type + '=' + id + '&quot;)" src="html/images/add.gif" width="8" height="8"/>';			output += '<img src="html/images/play.this.gif" width="5" height="9" onclick="parent.updateStatus';			output += 'Combined(&quot;&amp;command=playlist&amp;';			output += 'sub=loadtracks&amp;' + type + '=' + id + '&quot;)"/> </td><td class="browselisting">';			output += '<a onclick="parent.browseurl(&quot;browsedb.html?hierarchy=' + hierarchy + '&amp;';			output += 'level=0&amp;' + type + '=' + id + '&quot;)">' + results[j].firstChild.data + '</a>';			output += '</td></tr>';		}		output += "</table>";	}	document.getElementById("activesearchdiv").innerHTML = output;}
meta: 6551	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6551/76c2efa6f7f79a8af6628f1c5bf71a4a1b67d6bb/search.js/buggy/HTML/ExBrowse2/html/search.js