<html>
<head>
<script type = "text/javascript">
function Input()
{
var query;
var xmlhttp;
query = "PREFIX geo: <http://www.opengis.net/ont/OGC-GeoSPARQL/1.0/> PREFIX gn: <http://www.geonames.org/ontology#> PREFIX gu: <http://cegis.usgs.gov/rdf/gu/featureID#> SELECT DISTINCT ?school WHERE { GRAPH <http://example.org/data> { gu:_1705317 geo:hasGeometry ?ga_geo . ?school a gn:Feature ; geo:hasGeometry ?school_geo ; gn:featureCode gn:S.SCH . ?school_geo geo:sf-within ?ga_geo . } }";
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
}
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState == 4)
{
var list = [];
         count = 1;
         list = JSON.parse(xmlhttp.responseText);
         while((count - 1) < list.length)
         {
         var num = list[count - 1].substring(24, 31);
         document.write('<li>');
         document.write('<a href="/parliment/coords/' + num + '/">');
         document.write(list[count - 1]);
         document.write('</a>');
         document.write('</li>');
         count++;
}
document.write('</ul></body></html>');
}
}
xmlhttp.open("GET","/parliment/sparql?query=" + encodeURIComponent(query),true);
xmlhttp.send();
}
</script>
</head>
<body>
<form>
<input type="button" value="Send Query" onclick="Input()" />
</form>
</body>
</html>