Table of Contents

About

Answers assigned unique ID to result set associate with an answers request (called SID). If you want to retrieve the data set from an answer call, you can pass this parameter in a Go Url to retrieve the same result set.

http://obieehost/analytics/saw.dll?Go&searchid=sid

How to get the Sid ?

The Sid is present as attribute of the TD and DIV HTML elements. The principle is to add an element (in our example div with the id anchor) and to search the sid attributes in the parent nodes.

<div id="anchor"></div>

<script language="javascript">

function GetSid(nodeId) {
        
        var container = document.getElementById(nodeId);
	var sid = null;
	
	// Code to capture SID
	var x = container;
	do {
		if (x.nodeName == 'TD' || x.nodeName == 'DIV') {
			sid = x.getAttribute('sid');
			if (sid != null && sid != '')
				break;
		}
		x = x.parentNode;
	} while (x != null);

       return sid;
}

alert(GetSid("anchor"));

</script>