Connecting Tech Pros Worldwide Forums | Help | Site Map

Including a Javascript external file from the <body> part of an HTML file

davidemazza82@gmail.com
Guest
 
Posts: n/a
#1: Sep 26 '07
Hi all,

I got an [object error] from IE 7.0.5730.11 when moving the <script
src="..." type="text/javascript" /tag from the <headpart to the
<bodysection of a HTML file.

Is not possibile to include Javascript code via <script src="..."
type="text/javascript" /from the <bodysection, instead from the
<headone? If yes, anyone has any idea of which the problem could be?
If not, how can I programmatically include a javascript external file
inside the <bodypart of a HTML file, for example, using Javascript
to some particular native functions?

Tnx a lot

Bye
David


David Dorward
Guest
 
Posts: n/a
#2: Sep 26 '07

re: Including a Javascript external file from the <body> part of an HTML file


On Sep 26, 11:25 am, davidemazz...@gmail.com wrote:
Quote:
I got an [object error] from IE 7.0.5730.11 when moving the <script
src="..." type="text/javascript" /tag from the <headpart to the
<bodysection of a HTML file.
Don't use <script ... /unless you are serving your XHTML as
application/xhtml+xml, it causes things to break.
http://www.w3.org/TR/xhtml1/#C_3
Quote:
Is not possibile to include Javascript code via <script src="..."
type="text/javascript" /from the <bodysection, instead from the
<headone?
Yes.
Quote:
If yes, anyone has any idea of which the problem could be?
Trying to use something in on script that depends on the other script
running first is a good bet.

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/

Closed Thread