Is there any way to call a JAVASCRIPT function in PHP in AJAX

Answer Posted / arya

<?php
$str = '<script language="javascript">
function get_pop_up()
{
alert("This is a way to call JAVASCRIPT function in PHP");
}
</script>
<input type="button" name="Click" value="Click"
onclick="get_pop_up();">
';

echo $str;
?>

Is This Answer Correct ?    15 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are php magic methods?

525


How is it possible to parse a configuration file?

513


How to insert an new array element in array?

538


What is the difference between get and post in php?

515


Explain about the $_GET variable of PHP?

584






Are php variables global?

567


Tell me what types of loops exist in php?

576


Where sessions stored in PHP?

544


How can I load data from a text file into a table?

572


What are psrs? Choose 1 and briefly describe it?

952


Does php have multiple inheritance?

515


What is the empty function?

551


Does browser understand php?

492


What is php rest api?

536


What language is php based on?

498