Skip to content

Commit

Permalink
First ajax2 try
Browse files Browse the repository at this point in the history
  • Loading branch information
mconlon17 committed Jan 18, 2017
1 parent 5e119b3 commit 48a3156
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tpftest/ajax2.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
var fmt = "text/turtle"
$(document).ready(function(){
$("#go").click(function(){
$.ajax({
headers: {Accept : " + format.value + "; charset=utf-8"},
headers: {Accept : " + fmt + "; charset=utf-8"},
url: "http://openvivo.org/tpf/core",
data: {subject: "http://openvivo.org/a/orcid0000-0002-1304-8447", predicate: "", object: "", page: "1"},
success: function(data, status){
Expand All @@ -18,8 +19,8 @@
</script>
</head>
<body>
<input type="radio" name="format" value="text/turtle" checked> Turtle<br>
<input type="radio" name="format" value="application/n-triples"> N-Triples<br>
<input type="radio" name="format" value="text/turtle" checked onclick="fmt='text/turtle'"> Turtle<br>
<input type="radio" name="format" value="application/n-triples" onclick="fmt='application/n-triples'"> N-Triples<br>
<button id="go">TPF request via Ajax of OpenVIVO</button>
<pre id="output"></pre>

Expand Down

0 comments on commit 48a3156

Please sign in to comment.