Re: where to place the javascript in html page
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: where to place the javascript in html page

From: acord <acord@telpacific.com.au>
Date: Wed Mar 15 2006 - 15:19:07 CET

Hi,

I just found the following offending code causes the Draggable Layer not
moving:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

where should I place the above code in my html page?
I need to have that for a correct display of the font. But having it
will cause the box not movable. Without it, font is not display correctly.

A

acord wrote:
> Hi,
>
> I m getting annoying display problem when placing javascript tags in a
> html page. Should the javasscript tags placed at the beginning of a
> html page before anything start? or placed between the <head></head>
> tags? If I placed the script tags at the beginning of the html page, I
> can have the Draggale Layer shown and movable by the mouse, but the
> entired page will not read the style.css file (as I found the font
> displayed very ugly); If I placed the script tags between the <head>
> </head> tags, the Draggable Layer is movable, but the font are displayed
> correctly.
>
> eg.
>
> <script language="JavaScript1.2">
> Draw draggle layer...
> </script>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <title>Eveready</title>
> <link href="style.css" rel="stylesheet" type="text/css">
> </head>
>
> <body>
> ...
> </body>
>
> The above java script placed at the start of the html page will make the
> Draggable Layer moving fine, but the rest of the font dispalyed very ugly.
>
> Thanks
> A
Received on Mon May 1 04:05:08 2006