I am trying to create a dynamic sparql query within sgvizler.
Current query is like this:
<div id="query1"
data-sgvizler-query="
SELECT *
WHERE {
[] <http://localhost:2020/resource/vocab/rankings_university> ?Name ;
<http://localhost:2020/resource/vocab/rankings_id> ?Id ;
<http://localhost:2020/resource/vocab/rankings_overall_score> ?overall_score ;
FILTER regex(?Name, '(here comes a variable')
}
LIMIT 10"
data-sgvizler-chart="sText"
data-sgvizler-loglevel="2"
></div>
with jquery I do the following:
$(function() {
$("#searchsubmit").click( function()
{
value1 = $("#uni1").val();
alert(value1);
sgvizler.go();
}
);
});
All I get is a empty page without erros while the following does work:
$(document).ready(sgvizler.go());
Any idea how I can fix this? Thank you in Advance
This question is also found and answered in
http://code.google.com/p/sgvizler/issues/detail?id=38.
Here’s a new fiddle which takes input from the user builds a query and renders the results in a html container using sgvizler: http://jsfiddle.net/sgvizler/L5ztf/. See also comments in the fiddle code.