Widget:LoadRemoteContent: Difference between revisions

From Rangjung Yeshe Wiki - Dharma Dictionary
Jump to navigation Jump to search
((by SublimeText.Mediawiker))
((by SublimeText.Mediawiker))
Line 1: Line 1:
<div id="steinertDictDefinition"></div>
<div id="steinertDictDefinition"></div>
<script type="text/javascript">
<script type="text/javascript">
$(document).ready(function () {
function load(url, element){
$("#steinertDictDefinition").load("<!--{$src}--> #<!--{$hash}-->");
    req = new XMLHttpRequest();
}(jQuery));
    req.open("GET", url, false);
    req.send(null);
   
    element.innerHTML = req.responseText;
}
load("<!--{$src}-->", document.getElementById("<!--{$hash}-->"));
</script>
</script>

Revision as of 15:22, 5 May 2021

<script type="text/javascript"> function load(url, element){ req = new XMLHttpRequest(); req.open("GET", url, false); req.send(null);

element.innerHTML = req.responseText; } load("", document.getElementById("")); </script>