rem: gDatasourceName = ""; gMatchName = ""; gMethodName = ""; gTextName = ""; 
add:  var datasourceNode = document.getElementById("datasource"); if (!datasourceNode) return false; 
context: function doFind(){	gDatasourceName = "";	gMatchName = "";	gMethodName = "";	gTextName = "";	// get RDF datasource to query	var datasourceNode = document.getElementById("datasource");	if (!datasourceNode)	return(false);	var datasource = datasourceNode.selectedItem.getAttribute("data");	gDatasourceName = datasourceNode.selectedItem.getAttribute("value");	debug("Datasource: " + gDatasourceName + "\n");	// get match	var matchNode = document.getElementById("match");	if (!matchNode)		return(false);	var match = matchNode.selectedItem.getAttribute("data");	gMatchName = matchNode.selectedItem.getAttribute("value");	debug("Match: " + match + "\n");	// get method	var methodNode = document.getElementById("method");	if (!methodNode)	return(false);	var method = methodNode.selectedItem.getAttribute("data");	gMethodName = methodNode.selectedItem.getAttribute("value");	debug("Method: " + method + "\n");	// get user text to find	if (!findText)	return(false);	gTextName = findText.value;	if (!gTextName || gTextName=="")	return(false);	debug("Find text: " + gTextName + "\n");	// construct find URL	var url = "find:datasource=" + datasource;	url += "&match=" + match;	url += "&method=" + method;	url += "&text=" + escape(gTextName);	debug("Find URL: " + url + "\n");	// load find URL into results pane	var resultsTree = document.getElementById("findresultstree");	if (!resultsTree)	return(false);        resultsTree.setAttribute("ref", "");        resultsTree.setAttribute("ref", url);	// enable "Save Search" button	var searchButton = document.getElementById("SaveSearch");	if (searchButton)	{		searchButton.removeAttribute("disabled", "true");	}	debug("doFind done.\n");	return(true);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/f54e4fb1254309a19d0cc6f1fe0cc2dc08cd0725/bm-find.js/buggy/xpfe/components/bookmarks/resources/bm-find.js