Hema — included external file with JavaScript
The PHP code
<?php
include ("preg.html");
?>
The preg.html code
<script src="/js/jquery.min.js"></script>
<script>
function getFile ( theFile, theDiv ) {
theOffset = location.pathname.substring(0, location.pathname.lastIndexOf("/"));
// theOffset = location.pathname;
$.get("/textedit/core.php",
{
file: theFile,
prefix : theDiv,
cssid : theDiv,
offset : theOffset
},
function(data,status){
$("#"+theDiv).html(data);
}
);
}
</script>
<div id="hema"><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" onload="$thisFile = this.parentNode.id; getFile ( $thisFile , $thisFile );" /></div>
⇪ Feb 17 2021 05:47:41