cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <>
Subject RE: permit quoting
Date Thu, 03 Aug 2000 04:04:28 GMT
On Wed, 2 Aug 2000, Naegeli Margrit wrote:

> Sorry, I should have only left the javascript-relevant parts in the example.
> Yes, I have an XML that's processed by an XSL, but that's not what I wanted
> to show you.
> What I wanted to show was that I keep the javascript in a separate file,
> which is requested by the browser when it encounters the <script>-tag. This
> is like when you have an <img src="xxx.jpg"> in your html, which makes the
> browser request the file "xxx.jpg" from the server.
> In HTML, it looks like this:
> <head>
>   <title>Foo</title>
>   <script language="JavaScript" src="foo.js" type="text/javascript">
>   </script>
> </head>
> <body onload="bar1()">
> ...
> </body>

that's a _great_ technique when you can use it. sometimes it's not
feasible (dynamically generated javascript), but when you can, do so -
easier for you to maintain, faster for the web browser (no reloading and
reparsing necessary when moving from page to page).

- donald

View raw message