You are here: Re: php in javascript « PHP Programming Language « IT news, forums, messages
Re: php in javascript

Posted by juicy on 04/24/06 11:47

Fletch wrote:
>You need to learn about the request resonse >model. php is run to
>produce html(& javascript) which is then sent >to the browser. The
>broser then runs the html (& javascript). So >your code will be
>delivered to the browser as

><script language = "javascript">
>function getS (id){
>var output = "";
>if (document.getElementById("id").checked)
>{
> output = output + testing ; // <- error >testing is not a variable.
>}}
></script>

Sorry, I have mistype the code, it should be

output = output + "<? echo $text; ?>";

if I assign $text a short text, it will OK. But if $text is a paragraph/
multiple line of string, it will occur error on the page.

Please give idea on what has happen..
Thanks.

 

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

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