Click to See Complete Forum and Search --> : opera not including my .js file


edMX
11-17-2003, 06:35 AM
I have a piece of javascript in an external .js file that works fine in IE but doesn't work at all in Opera. When I copy the contents of the external .js file into the page it works fine.

I'm using the line

<script src="js/main.js" type="text/javascript"></script>

to include the javascript. I have tried putting this in the Header and in various places in the Body. None of these attempts work.

Anyone know why Opera isn't including my .js file?

fredmv
11-17-2003, 06:53 AM
Originally posted by edMX
works fine in IEThat doesn't say much. :D

Make sure you have only JavaScript code inside your external .js file. I'm guessing you have opening and closing <script> tags which are causing your problems.

Good luck.

edMX
11-17-2003, 08:54 AM
thanks,

It turns out I had <!-- and --> in the .js files that were ignored in MSIE but not in Opera

:)