|
|
Posted by Tim Streater on 10/31/07 09:59
In article <fg834c$408$1@news-int2.gatech.edu>,
David Williams <dw149@acmex.gatech.edu> wrote:
> Okay,
> I better understand. What everyone is saying is php merely outputs plain
> text strings which can be HTML or Javascript or whatever. I write the code
> in
> php, send it to the server, and PHP outputs a a string that the browser can
> interpret( whether it interprets it to be javascript or html ).
>
> When I say mix php and javascript, I don't mean mix literally I mean
> writing code that has php and javascript syntax intertwined ( at least to the
> eyeye ) . I now understand that php just sees it as a string, period. The
> server interprets the code, and outputs something it feels the browser can
> read.
Yes. When the JavaScript runs, there is *no* PHP code left; it's already
been executed. The PHP may have done something *relevant* to the
JavaScript, however, sych as generate a bit more JS. That will then be
executed on the client like all the other JS.
Navigation:
[Reply to this message]
|