In the html file:
<html>
<head>
<script type="text/javascript" src="/images/files/js/callback.js"></script>
</head>
</html>
in the callback.js file:
$(document).ready(function() {
document.write('<script type="text/javascript" src="/images/files/css/style.css" ></script>');
document.write('<link src="/images/files/js/core.js">');
}
About some reason it will add al the text of the callback.js file into my page but won't load the style.css and the core.js, So when I visit the page the elements of callback.js will be in the head element but they don't work on the page, so I have a page without css and js
second thing I want to achieve is that if it has load all the content of the callback.js it will remove the link to callback.js so that file isn't visible anymore
The reason I want to do this is in javascript/jquery is because I hate php and I've a lot of pages with exactly the same links in it.