Javascript and PHP



Share on Google+Share on Google+

Javascript and PHP
1 Answer(s)      5 years ago
Posted in : PHP


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

Could you please tell me the way to call it?


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");


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



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
how to put php in javascript
how to put php in javascript  How to write a javascript code inside php block
javascript echo php
javascript echo php  i would like to know the complete syntax with the running example of using JavaScript echo in PHP. Thanks
PHP JavaScript form Validation - PHP
PHP JavaScript form Validation  Just looking for a general PHP JavaScript form Validation. How can I write external JavaScript Validation? Please suggest!  Hi Friend, 1) form Enter Name Enter Address
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
php variable in javascript
php variable in javascript  Access php variables in Javascipt or Jquery rather than php echo $variable
integrate javascript in php
integrate javascript in php  how to integrate javascript into html
PHP Variables in JavaScript
PHP Variables in JavaScript JavaScript and PHP both are scripting language... on the internet. Let's see how can you use PHP variables in JavaScript. For example of PHP Variable in JavaScript: <title>PHP Variable in JavaScript<
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
JavaScript  clone JavaScript
javascript  javascript code to dynamically add table on button click.../javascript/javascriptexamples/javascript-add-row-dynamically.shtml
Javascript  How validations are done using javascript ,with example? and interview questions on 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  how to get full path of a file type in javascript
javascript  Hi deepak, how to write form validation on javascript
javascript  write a program to display implement about browsers using javascript
javaScript  How to open a browser window that cannot be resized? (HTML + Javascript
javascript  i have just learned javascript... can you tell me what kind of applications can be made by javascript?? thank you
php   what is php   PHP Tutorials
javascript  hi sir, if i want to learn javascript. what concepts i want to know
javascript  how to set the request or session attribute in javascript head part of jsp page
javascript  Hi sir, This is sinduri, i want to learn javascript, so plz can u help to learn
JAVASCRIPT  I have one textbox and I want to validate that it must start with number(1-0). can anyone tell me a javascript for that ? thanks in advance
Javascript   Javascript to check Numeric entry in checkbox.....   Hi Please find the following code for numeric entry validation in javascript function validateBox(){ var data=document.myForm.someText.value
php  what is php
javascript  hi, I was actually working on to calculate the number of days between two dates of yyyy-mm-dd format using javascript, and when i click on button then number of days should be display in textbox
javaScript  . Print a table like below in JAVASCRIPT 5 x 1 = 5 5 x 2 = 10 ΓΆβ?¬Β¦ΓΆβ?¬Β¦ΓΆβ?¬Β¦. 5 x 20 = 100
javascript  passing javascript values to jsp   Hi Friend, Try the following code: form.jsp: <html> <script> function getMsg...;/script> <input type="button" onclick="getMsg();" value="Get Javascript value
this format xxx-xxx-xxxx, i want the code in javascript. as a function.   Javascript Phone Number Validation <html> <script> function..." method="post" onsubmit="javascript:return validate();"> Phone Number:<
Javascript  Dear Sir, Thank You a lot for your continuos support.Again i am in need of your help. What is the javascript code to disable a link,once... javascript or css Please help me.Urgent Regards Debasis   Hello Friend