"Harry" <a@abc.com> wrote:
[color=blue]
>but I'm a bit puzzled with javascript functions you can include to use in a
>JSP page - you can't see them in the page source code but can call them -
>does this mean
>
>they are called on the server each time - I always thought javascript was
>client side only?
>
>or are all of them in the include .js file downloaded for use at the client
>end somewhere?[/color]
If you're talking about this kind of syntax:
<SCRIPT LANGUAGE="Javascript" SRC="something.js">
Then yes, that's handled by the client-side browser. When the browser
encounters this statement, it issues an HTML request for
"something.js", and interprets it just as if its contents were between
<SCRIPT LANGUAGE="Javascript">
and
</SCRIPT>
tags.
Various server-side processing schemes (ASP, PHP, etc) implement
server-side includes. If you use those, the included file is
transmitted to the client as part of the original request, the client
never knows that the content came from a separate file.
--
Tim Slattery
Slattery_T@bls.gov