I have 2 files that should be connected.
file.php and page.html
file.php contain this code below:
document.writeln('< script src="https://www.googletagservices.com/tag/js/gpt.js">
googletag.pubads().definePassback('/11322282/48fashion.com//300x250', [300, 250]).set("page_url","http://48fashion.com/").display();
< /script>');
page.html contain this code below:
< html > <br>
< head> <br>
< script src="file.php" type="text/javascript" > < /script>
<br>
< /head>
< body> <br>
< /body> <br>
< /html>
Now when I refresh the page.html I received this error message "Uncaught SyntaxError: Invalid or unexpected token"
No, I see that loading a js src with another js src is not working. How make it work?
document.writelnjavascript code but you don't wrap it inside<script>..</script>tagsscripttag. Now, what is the real code you are using? We cannot help you to catch synthax error if you just post some random code. And see Samir's answer, because this is a valid point, you have mismatching quotesscriptwithsrcattribute just ignores its content. Anyway, you have fixed your issue... :)