You are here: Re: Here is how to 'do PHP' without leaving a page. (+ Question) « PHP Programming Language « IT news, forums, messages
Re: Here is how to 'do PHP' without leaving a page. (+ Question)

Posted by Jim Michaels on 01/22/06 09:55

"joksnet" <joksnet@gmail.com> wrote in message
news:1137008159.862213.129530@o13g2000cwo.googlegroups.com...
> Some example of dynamically create a script tag is:
>
> <script type="text/javascript">
> head = document.getElementsByTagName("head")[0];
> script = 0;
>
> function create_script(file){
> if(script){
> head.removeChild(head.lastChild);
> }
>
> s = document.createElement('SCRIPT');
> s.src=file;
> s.id='scriptCat';
> head.appendChild(s);
> script = 1;
> }
>
> create_script('foo.php?msg=something');
> </script>
>
> -----------------
> --- foo.php ---
> -----------------
>
> <?
> echo "alert(" . $_GET['msg'] . ");";
> ?>


I saw from another post that "short tags" may be deprecated.

 

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

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