File Create Problems.

Chrisman

New Member
Messages
5
Reaction score
0
Points
0
Hey guys, I hope this Forum is the correct to go to for this problem. I am trying to create a Javascript page (.js extension), but I don't know how. I figured out that to make a .php page, you click "New File" (in the File Manager) and then type the name of your page followed by .php. I tryed that for .css pages, and it worked (the type becomes "text/css"). I just can't seem to get it to work for .js. Is it a different extension? Is there somewhere I need to go and type "text/javascript" instead? All help is appreciated, thanks.
 

Mekryd

New Member
Messages
50
Reaction score
0
Points
0
What part isn't working? It won't make the file? Or the file won't work when you try to call it?
 

Chrisman

New Member
Messages
5
Reaction score
0
Points
0
Ah, sorry. When I make "reflection.js" it is file type "text/x-generic" and not "text/javascript" so the JavaScript coding on the page isn't rendered.
Edit:
Nevermind. I just figured out my problem. When importing the script using

Code:
<script type="text/javascript" src="URL"></script>

I put it in the head, not the body. The script must've been disregarded.
 
Last edited:
Top