A noob question here, by a novice programmer.
I am trying to do a javascript inside a .php file, in my index I included this line:
<script type="text/javascript" src="/js/basic.php"></script>
And in my basic.php:
<?php Header("content-type: text/javascript"); ?>
<script>
Ext.Loader.setConfig({
enabled: true,
disableCaching: false,
paths: {
"Extensible": "/js/extensible/src",
"Schedule.Calendar.data": "/js/data",
"Schedule.Calendar.listeners":"/js/listeners",
"Schedule.Calendar.override":"/js/override",
"Schedule.Calendar.panels": "/js/panels"
}
});
</script>
And it keeps sending an error saying:
SyntaxError: missing } in XML expression
The
basic.php
file should only be outputting pure JavaScript. The<script>
tags are HTML and are not needed.