forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kho braun <...@pobox.com>
Subject Re: Foreign html + javascript links + .js file
Date Sat, 08 Mar 2003 22:41:01 GMT
As for Javascript in the <head> section:
Statements that appear between <script> tags are executed in the order they appear on
an html page, so putting the script in the <head> section ensures it is executed before
any script tags in the <body> section are executed.

Also, certain properties of the Document object may only be set from the <head> section.
Examples are Document.title, Document.ids, Document.linkColor, Document.contextual().

--
kho braun.

"Jeff Turner" <jefft@apache.org> wrote in message news:<20030308142520.GC11282@expresso.localdomain>...
>On Sun, Mar 09, 2003 at 12:04:27AM +1000, Peter B. West wrote:
>> Jeff,
>> > I have these files now being successfully included.  However...
>> > Jeff Turner wrote:
>> >On Sat, Mar 01, 2003 at 10:04:06PM +1000, Peter B. West wrote:
>> >
>> >>Jeff Turner wrote:
>> >>
>> >>>You could have a regular well-formed HTML file:
>> >>>
>> >>><html>
>> >>><body>
>> >>>  <script language="JavaScript" type="text/javascript" > >>>
 src="resources/script.js"/>
>> >>>  <h1>Blah ..</h1>
>> >>>  ....
>> >>></body>
>> >>></html>
>> >>>
>> >>>If saved with a .ehtml extension ("embedded html"), everything below
the
>> >>><body> is copied across verbatim, and the header and menus are
added.
>> > The problem here is that the script element, not being in the body, is >
not being copied across.  Consequently, my javascript: links are not > working.  Any way
around this?
>Can you move the <script> into the body?
>Adding support for stuff in <head> is possible, but a bit messy, so I'm
>interested to find out if there's any use-cases where things *have* to be
>in <head>..
>--Jeff
>> Peter
>> -- > Peter B. West  pbwest@powerup.com.au  http://www.powerup.com.au/~pbwest/
>> "Lord, to whom shall we go?"
>> 


Mime
View raw message