Template:Team:Paris-Saclay/left-column

From 2012.igem.org

(Difference between revisions)
Line 14: Line 14:
<div id="ltArticles"></div>
<div id="ltArticles"></div>
<script type="text/javascript">
<script type="text/javascript">
-
$.ajax({
+
$(document).ready(function() {
 +
 
 +
  jQuery.ajax({
 +
    $.ajax({
     type: "GET",
     type: "GET",
-
     url: "https://2012.igem.org/wiki/api.php"),
+
     url: "https://2012.igem.org/wiki/api.php", // name of file you want to parse
-
     data: "action=query&list=categorymembers&cmtitle=Category:Team:Paris-Saclay/Test",
+
     async : false,
 +
data:{
 +
format: 'xml',
 +
action: 'query',
 +
list: 'categorymembers',
 +
cmtitle: 'Category:Team:Paris-Saclay/Test'},
     dataType: "xml", // type of file you are trying to read
     dataType: "xml", // type of file you are trying to read
     success  : function(xmlData){
     success  : function(xmlData){
-
var test = $(xmlData).find('categorymembers');
+
alert("ok");
-
$(xmlData).find('cm').each(function() {
+
var test = $(xmlData).find('categorymembers');
-
alert('k');
+
$(xmlData).find('cm').each(function() {
-
} )
+
alert('k');
 +
} )
},
},
error    : function(){
error    : function(){
Line 29: Line 38:
}
}
  });
  });
 +
  });
 +
 +
});
</script>
</script>
</div>
</div>

Revision as of 17:19, 20 August 2012

Follow us !