Javascript and PHP

Ads
 

Javascript and PHP

Hello,

I want to know how to call javascript function inside PHP code .

Could you please tell me the way to call it?

Thanks

View Answers

September 3, 2012 at 12:59 PM

Here is a simple example of php that calls javascript function.

<script language="javascript">
function hello()
{
alert("Hello World");
}
</script>


<?

echo "<SCRIPT LANGUAGE='javascript'>hello();</SCRIPT>";

?>

Ads









Related Tutorials/Questions & Answers:
Javascript and PHP
Javascript and PHP  Hello, I want to know how to call javascript function inside PHP code . Could you please tell me the way to call it? Thanks   Here is a simple example of php that calls javascript function. <
JavaScript in PHP Loop
JavaScript in PHP Loop  i wants to know how to implement the JavaScript code into the PHP Loop function. Thanks
Advertisements
how to put php in javascript
how to put php in javascript  How to write a javascript code inside php block
php,javascript,html
php,javascript,html  Hi, thank u for answered the previous question. one more question: when i register the student details, unique register number should be created and incresed automatically for every student based
do not repeat values in databse during insertion using php and javascript
do not repeat values in databse during insertion using php and javascript  hello all, after tried so much now posting here. i have two programs.../javascript"> function validateForm() { var y=document.forms["myForm"]["name
php
php   what is php   PHP Tutorials
php
php  what is php
php
php using javasript  how to set timer in php using javasript
php
php  i want to know about php and php plateform required software to make php program and database that used in php program?   Please visit the following link: PHP database
php
php  i want to know about php and php plateform required software to make php program and database that used in php program?   Please visit the following link: PHP database
JavaScript
JavaScript  clone JavaScript
php
php  show the constructor overloading in php
PHP
PHP  How to work in drupal with PHP
php
php  how to write a program in php to create pdf file
php
php  what is php   PHP is one of the most used open source server-side scripting language, which runs on almost all the platform. PHP... and Solaris. To know more about PHP, Visit Here
javascript
javascript  javascript code to dynamically add table on button click.../javascript/javascriptexamples/javascript-add-row-dynamically.shtml http://www.roseindia.net/javascript/javascript-add-row-to-table.shtml http://www.roseindia.net
php
php  plz tell me code for PHP SQL Insert,delete,update,view is used to insert the record from HTML page to Mysql database using in single PHP form
php
php  retrieve data from mysql in php   Please visit the following links: http://www.roseindia.net/sql/mysql-table/mysql-php-select.shtml http://www.roseindia.net/sql/mysql-example/select-where.shtml
Javascript
Javascript  How validations are done using javascript ,with example? and interview questions on javASCRIPT
php
php  How to catch a image and link click counters using Ajax php can any one help me
PHP
PHP  I want to create Calendar Event in PHP. Could u help me
php
php  how to set email remainder in php?can you help me pls
PHP
PHP  How to check whether a username exists on a website using php and cURL and not MySQL
JavaScript
should use JavaScript? Thanks   Hi, JavaScript is scripting language that runs on browser. You have to embed JavaScript in HTML page. Please see JavaScript tutorial. Thanks
JavaScript
JavaScript  how to get full path of a file type in javascript
javascript
javascript  Hi deepak, how to write form validation on javascript
javascript
javascript  write a program to display implement about browsers using javascript
javaScript
javaScript  How to open a browser window that cannot be resized? (HTML + Javascript
php
Write a simple PHP program that display the days of week as per the system date using switch case statement.  Write a simple PHP program that display the days of week as per the system date using switch case statement
javascript
javascript  i have just learned javascript... can you tell me what kind of applications can be made by javascript?? thank you
PHP
PHP  I would love to do PHP project with the title of "Hospital Management System". I want to know how to make validation using jquery

Ads