You are here: Re: Assigning PHP var to Javascript « PHP Programming Language « IT news, forums, messages
Re: Assigning PHP var to Javascript

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация