diff --git a/html/.htaccess b/html/.htaccess new file mode 100644 index 0000000..b741439 --- /dev/null +++ b/html/.htaccess @@ -0,0 +1 @@ +Header add Access-Control-Allow-Origin "*" \ No newline at end of file diff --git a/js/istex-widget.js b/js/istex-widget.js new file mode 100644 index 0000000..94debda --- /dev/null +++ b/js/istex-widget.js @@ -0,0 +1,18 @@ +var IstexWidget = function() {}; + +IstexWidget.prototype = { + injectHTML: function() { + + var searchWidget = document.getElementById("istex-widget-search"); + var request = new XMLHttpRequest(); + request.open("GET", "http://caron.ads.intra.inist.fr/istex-api-widget/html/part_search.html"); + request.onload = function() { + console.log("C'est bon? ") + searchWidget.innerHTML = request.responseText; + }; + request.send(); + } +}; + +var istexWidget = new IstexWidget(); +istexWidget.injectHTML(); \ No newline at end of file diff --git a/test/testpage.html b/test/testpage.html index ea23884..5da7b8d 100644 --- a/test/testpage.html +++ b/test/testpage.html @@ -12,6 +12,6 @@
- + \ No newline at end of file