[Javascript] SRC=Javascript file
Ben
ben at babelfish.co.uk
Thu Apr 19 05:39:58 CDT 2001
hth... hello Ken, good to see a friendly face (?) from the ASP list :)
.b
----- Original Message -----
From: "Ken Schaefer" <ken at adOpenStatic.com>
To: <javascript at LaTech.edu>
Sent: Thursday, April 19, 2001 11:08 AM
Subject: Re: [Javascript] SRC=Javascript file
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> : You know how you can link to a file in Script ie
> :
> : <script src=js.asp>
> : </script>
> :
> : In that file, how can I escape the JS code....eg
> : I might have
> : alert ("Hello world")
> :
> : but then I might want to use some ASP script to
> : get another value eg
> :
> : <% txt=now %>
> : alert (txt);
> :
> : Can I do that somehow? Didn't seem to work when I tried it.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> ASP is all done server-side - before anything is sent to the client. You
> need to Response.Write the ASP stuff to the HTTP stream that is sent to
the
> client, eg:
>
> alert("<% Response.Write("Hello World")%>");
>
> or
>
> var strVar = "<% Response.Write("Hello World")%>";
> alert(strVar);
>
> HTH
>
> Cheers
> Ken
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> http://www.LaTech.edu/mailman/listinfo/javascript
>
More information about the Javascript
mailing list