You are here: Re: PHP activating JAVASCRIPT? « All PHP « IT news, forums, messages
Re: PHP activating JAVASCRIPT?

Posted by Steve on 04/12/07 18:11

jesus christ!

javascript is NOT PHP...one is run on the SERVER and the other is run on the
CLIENT. NO, you CAN'T have PHP execute javascript!

as it is, don't use body.onload. put the javascript function call after
</body> ... anywhere after it including </html>

BTW, WTF R U YELLING?!!!


"kick ass" <pub_lander@yahoo.com> wrote in message
news:evlpih$nqb$1@news1.carnet.hr...
| Hello
|
| My problem is:
| I have one JAVASCRIPT inside <head> of my HTML.
| I want PHP code which is written inside the <body> of my HTML to activate
| it.
|
| Here is the sample code that works (but I dont want to use ONLOAD
command ):
|
| <head>
| <title>Untitled Document</title>
| <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
| function sayhello (text) {
| alert(text);
| }
| </SCRIPT>
| </head>
|
| <body onload="javascript:sayhello('SOME_TEXT')">
|
| </body>
|
| -------------------------------------------------------------------
|
|
| <head>
| <title>Untitled Document</title>
| <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
| function sayhello (text) {
| alert(text);
| }
| </SCRIPT>
| </head>
|
| <body> <!-- I DONT WANT TO USE onLoad HERE-->
| <?php
|
| ---now here i want to activate that javascript above but using php
| code.... IS IT POSSIBLE SOMEHOW TO CALL THAT FUNCTION???---
| ?>
|
| </body>
|
| THANKS FOR ANY HELP!!

 

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

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